class CreateDefinition extends Component

Parses the create definition of a column or a key.

Used for parsing CREATE TABLE statement.

Properties

static array $FIELD_OPTIONS All field options.
string $name The name of the new column.
bool $isConstraint Whether this field is a constraint or not.
DataType $type The data type of thew new column.
Key $key The key.
Reference $references The table that is referenced.
OptionsArray $options The options of this field.

Methods

static mixed
parse(Parser $parser, TokensList $list, array $options = array())

No description

static string
build(mixed $component, array $options = array())

No description

string
__toString()

Builds the string representation of a component of this type.

from Component
__construct(string $name = null, OptionsArray $options = null, DataType|Key $type = null, bool $isConstraint = false, Reference $references = null)

Constructor.

Details

at line 152
static mixed parse(Parser $parser, TokensList $list, array $options = array())

Parameters

Parser $parser the parser that serves as context
TokensList $list the list of tokens that are being parsed
array $options parameters for parsing

Return Value

mixed

at line 306
static string build(mixed $component, array $options = array())

Parameters

mixed $component the component to be built
array $options parameters for building

Return Value

string

in Component at line 73
string __toString()

Builds the string representation of a component of this type.

Return Value

string

See also

at line 127
__construct(string $name = null, OptionsArray $options = null, DataType|Key $type = null, bool $isConstraint = false, Reference $references = null)

Constructor.

Parameters

string $name the name of the field
OptionsArray $options the options of this field
DataType|Key $type the data type of this field or the key
bool $isConstraint whether this field is a constraint or not
Reference $references references