PHP Class SqlParser\Components\Key

Used for parsing CREATE TABLE statement.
Author: Dan Ungureanu ([email protected])
Inheritance: extends SqlParser\Component
Afficher le fichier Open project: phpmyadmin/sql-parser Class Usage Examples

Méthodes publiques

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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

Method Details

__construct() public méthode

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 méthode

public static build ( Key $component, array $options = [] ) : string
$component Key The component to be built.
$options array Parameters for building.
Résultat string

parse() public static méthode

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.
Résultat Key

Property Details

$KEY_OPTIONS public_oe static_oe property

All key options.
public static array $KEY_OPTIONS
Résultat array

$columns public_oe property

Columns.
public array $columns
Résultat array

$name public_oe property

The name of this key.
public string $name
Résultat string

$options public_oe property

The options of this key.
public OptionsArray,SqlParser\Components $options
Résultat OptionsArray

$type public_oe property

The type of this key.
public string $type
Résultat string