final class Key extends SerializableComponent (View source)

Parses the definition of a key.

Used for parsing CREATE TABLE statement.

Properties

string|null $name

The name of this key.

array<array{name?: string, length?: int, order?: string}> $columns

The key columns

string|null $type

The type of this key.

string|null $expr

The expression if the Key is not using column names

OptionsArray|null $options

The options of this key or null if none where found.

Methods

string
__toString()

No description

array
jsonSerialize()

No description

__construct(string|null $name = null, array $columns = [], string|null $type = null, OptionsArray|null $options = null)

No description

string
build()

Builds the string representation of a component of this type.

Details

string __toString()

No description

Return Value

string

array jsonSerialize()

No description

Return Value

array

__construct(string|null $name = null, array $columns = [], string|null $type = null, OptionsArray|null $options = null)

No description

Parameters

string|null $name

the name of the key

array $columns

the columns covered by this key

string|null $type

the type of this key

OptionsArray|null $options

the options of this key

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