final class CreateDefinition implements Component (View source)

Parses the create definition of a column or a key.

Used for parsing CREATE TABLE statement.

Properties

string|null $name

The name of the new column.

bool|null $isConstraint

Whether this field is a constraint or not.

DataType|null $type

The data type of thew new column.

Key|null $key

The key.

Reference|null $references

The table that is referenced.

OptionsArray|null $options

The options of this field.

Methods

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

No description

string
build()

Builds the string representation of a component of this type.

string
__toString()

No description

Details

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

No description

Parameters

string|null $name

the name of the field

OptionsArray|null $options

the options of this field

Key|null $type

the data type of this field or the key

bool $isConstraint

whether this field is a constraint or not

Reference|null $references references

string build()

Builds the string representation of a component of this type.

In other words, this function represents the inverse function of {\PhpMyAdmin\SqlParser\Component::parse()}.

Return Value

string

string __toString()

No description

Return Value

string