PHP Class SqlParser\Statements\CreateStatement

Inheritance: extends SqlParser\Statement
显示文件 Open project: phpmyadmin/sql-parser Class Usage Examples

Public Properties

Property Type Description
$DB_OPTIONS array All database options.
$FUNC_OPTIONS array All function options.
$OPTIONS array Options for CREATE statements.
$TABLE_OPTIONS array All table options.
$TRIGGER_OPTIONS array All trigger options.
$body SqlParser\Token[] | string Used by CREATE FUNCTION, CREATE PROCEDURE and CREATE VIEW.
$entityOptions SqlParser\Components\OptionsArray Used by CREATE TABLE, CREATE FUNCTION and CREATE PROCEDURE.
$fields SqlParser\Components\CreateDefinition[] | SqlParser\Components\ArrayObj If CREATE VIEW, a list of columns. Used by CREATE TABLE and CREATE VIEW.
$like SqlParser\Components\Expression .. LIKE Used by CREATE TABLE`
$name SqlParser\Components\Expression Used by all CREATE statements.
$parameters SqlParser\Components\ParameterDefinition[] Used by CREATE FUNCTION and CREATE PROCEDURE.
$partitionBy string Expression used for partitioning.
$partitions SqlParser\Components\PartitionDefinition[] The partition of the new table.
$partitionsNum integer The number of partitions.
$return SqlParser\Components\DataType Used by CREATE FUNCTION.
$select SelectStatement .. SELECT Used by CREATE TABLE`
$subpartitionBy string Expression used for subpartitioning.
$subpartitionsNum integer The number of subpartitions.
$table SqlParser\Components\Expression Used by CREATE TRIGGER.

Public Methods

Method Description
build ( ) : string
parse ( Parser $parser, TokensList $list ) : void

Method Details

build() public method

public build ( ) : string
return string

parse() public method

public parse ( Parser $parser, TokensList $list ) : void
$parser SqlParser\Parser The instance that requests parsing.
$list SqlParser\TokensList The list of tokens to be parsed.
return void

Property Details

$DB_OPTIONS public_oe static_oe property

All database options.
public static array $DB_OPTIONS
return array

$FUNC_OPTIONS public_oe static_oe property

All function options.
public static array $FUNC_OPTIONS
return array

$OPTIONS public_oe static_oe property

Options for CREATE statements.
public static array $OPTIONS
return array

$TABLE_OPTIONS public_oe static_oe property

All table options.
public static array $TABLE_OPTIONS
return array

$TRIGGER_OPTIONS public_oe static_oe property

All trigger options.
public static array $TRIGGER_OPTIONS
return array

$body public_oe property

Used by CREATE FUNCTION, CREATE PROCEDURE and CREATE VIEW.
public Token[],SqlParser|string $body
return SqlParser\Token[] | string

$entityOptions public_oe property

Used by CREATE TABLE, CREATE FUNCTION and CREATE PROCEDURE.
See also: static::$TABLE_OPTIONS
See also: static::$FUNC_OPTIONS
See also: static::$TRIGGER_OPTIONS
public OptionsArray,SqlParser\Components $entityOptions
return SqlParser\Components\OptionsArray

$fields public_oe property

If CREATE VIEW, a list of columns. Used by CREATE TABLE and CREATE VIEW.
public CreateDefinition[],SqlParser\Components|ArrayObj,SqlParser\Components $fields
return SqlParser\Components\CreateDefinition[] | SqlParser\Components\ArrayObj

$like public_oe property

.. LIKE Used by CREATE TABLE`
public Expression,SqlParser\Components $like
return SqlParser\Components\Expression

$name public_oe property

Used by all CREATE statements.
public Expression,SqlParser\Components $name
return SqlParser\Components\Expression

$parameters public_oe property

Used by CREATE FUNCTION and CREATE PROCEDURE.
public ParameterDefinition[],SqlParser\Components $parameters
return SqlParser\Components\ParameterDefinition[]

$partitionBy public_oe property

Expression used for partitioning.
public string $partitionBy
return string

$partitions public_oe property

The partition of the new table.
public PartitionDefinition[],SqlParser\Components $partitions
return SqlParser\Components\PartitionDefinition[]

$partitionsNum public_oe property

The number of partitions.
public int $partitionsNum
return integer

$return public_oe property

Used by CREATE FUNCTION.
public DataType,SqlParser\Components $return
return SqlParser\Components\DataType

$select public_oe property

.. SELECT Used by CREATE TABLE`
public SelectStatement,SqlParser\Statements $select
return SelectStatement

$subpartitionBy public_oe property

Expression used for subpartitioning.
public string $subpartitionBy
return string

$subpartitionsNum public_oe property

The number of subpartitions.
public int $subpartitionsNum
return integer

$table public_oe property

Used by CREATE TRIGGER.
public Expression,SqlParser\Components $table
return SqlParser\Components\Expression