PHP Class SqlParser\Components\DataType

Inheritance: extends SqlParser\Component
Afficher le fichier Open project: phpmyadmin/sql-parser Class Usage Examples

Méthodes publiques

Свойство Type Description
$DATA_TYPE_OPTIONS array All data type options.
$name string The name of the data type.
$options OptionsArray The options of this data type.
$parameters array Some data types have no parameters. Numeric types might have parameters for the maximum number of digits, precision, etc. String types might have parameters for the maximum length stored. ENUM and SET have parameters for possible values. For more information, check the MySQL manual.

Méthodes publiques

Méthode Description
__construct ( string $name = null, array $parameters = [], OptionsArray $options = null ) Constructor.
build ( DataType $component, array $options = [] ) : string
parse ( Parser $parser, TokensList $list, array $options = [] ) : DataType

Method Details

__construct() public méthode

Constructor.
public __construct ( string $name = null, array $parameters = [], OptionsArray $options = null )
$name string The name of this data type.
$parameters array The parameters (size or possible values).
$options OptionsArray The options of this data type.

build() public static méthode

public static build ( DataType $component, array $options = [] ) : string
$component DataType 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 = [] ) : DataType
$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 DataType

Property Details

$DATA_TYPE_OPTIONS public_oe static_oe property

All data type options.
public static array $DATA_TYPE_OPTIONS
Résultat array

$name public_oe property

The name of the data type.
public string $name
Résultat string

$options public_oe property

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

$parameters public_oe property

Some data types have no parameters. Numeric types might have parameters for the maximum number of digits, precision, etc. String types might have parameters for the maximum length stored. ENUM and SET have parameters for possible values. For more information, check the MySQL manual.
public array $parameters
Résultat array