PHP Класс SqlParser\Components\Key

Used for parsing CREATE TABLE statement.
Автор: Dan Ungureanu ([email protected])
Наследование: extends SqlParser\Component
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$KEY_OPTIONS array All key options.
$columns array Columns.
$name string The name of this key.
$options OptionsArray The options of this key.
$type string The type of this key.

Открытые методы

Метод Описание
__construct ( string $name = null, array $columns = [], string $type = null, OptionsArray $options = null ) Constructor.
build ( Key $component, array $options = [] ) : string
parse ( Parser $parser, TokensList $list, array $options = [] ) : Key

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( string $name = null, array $columns = [], string $type = null, OptionsArray $options = null )
$name string The name of the key.
$columns array The columns covered by this key.
$type string The type of this key.
$options OptionsArray The options of this key.

build() публичный статический Метод

public static build ( Key $component, array $options = [] ) : string
$component Key The component to be built.
$options array Parameters for building.
Результат string

parse() публичный статический Метод

public static parse ( Parser $parser, TokensList $list, array $options = [] ) : Key
$parser SqlParser\Parser The parser that serves as context.
$list SqlParser\TokensList The list of tokens that are being parsed.
$options array Parameters for parsing.
Результат Key

Описание свойств

$KEY_OPTIONS публичное статическое свойство

All key options.
public static array $KEY_OPTIONS
Результат array

$columns публичное свойство

Columns.
public array $columns
Результат array

$name публичное свойство

The name of this key.
public string $name
Результат string

$options публичное свойство

The options of this key.
public OptionsArray,SqlParser\Components $options
Результат OptionsArray

$type публичное свойство

The type of this key.
public string $type
Результат string