final class Key implements Component (View source)

Parses the definition of a key.

Used for parsing CREATE TABLE statement.

Properties

string|null $name

The name of this key.

array<int,array<string,int|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

__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.

string
__toString()

No description

Details

__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

string __toString()

No description

Return Value

string