EnumType extends Type

Type that maps a TYPE field.

Internal

not part of public core API.

Tags
todo

EnumType does not work for SQLite and PostgresSQL. SQLite supports it with a slightly other syntax and PostgreSQL needs to create a custom type with a human-readable name, which is not reasonable either. Consider to deprecate and drop ENUM support due not having compatibility for all supported database systems.

  • @see https://www.postgresql.org/docs/current/datatype-enum.html#DATATYPE-ENUM (PostgreSQL)
  • @see https://www.sqlite.org/lang_createtable.html#ckconst (SQlite)
  • @see https://stackoverflow.com/questions/5299267/how-to-create-enum-type-in-sqlite

Table of Contents

Constants

TYPE  = 'enum'

Methods

getName()  : string
Gets the name of this type.
getSQLDeclaration()  : string
Gets the SQL declaration snippet for a field of this type.

Constants

Methods

getSQLDeclaration()

Gets the SQL declaration snippet for a field of this type.

public getSQLDeclaration(array<string|int, mixed> $fieldDeclaration, AbstractPlatform $platform) : string
Parameters
$fieldDeclaration : array<string|int, mixed>

The field declaration.

$platform : AbstractPlatform

The currently used database platform.

Return values
string

        
On this page

Search results