PHP Class SqlParser\Components\OrderKeyword

Author: Dan Ungureanu ([email protected])
Inheritance: extends SqlParser\Component
Mostra file Open project: phpmyadmin/sql-parser Class Usage Examples

Public Properties

Property Type Description
$expr Expression The expression that is used for ordering.
$type string The order type.

Public Methods

Method Description
__construct ( Expression $expr = null, string $type = 'ASC' ) Constructor.
build ( OrderKeyword | OrderKeyword[] $component, array $options = [] ) : string
parse ( Parser $parser, TokensList $list, array $options = [] ) : OrderKeyword[]

Method Details

__construct() public method

Constructor.
public __construct ( Expression $expr = null, string $type = 'ASC' )
$expr Expression The expression that we are sorting by.
$type string The sorting type.

build() public static method

public static build ( OrderKeyword | OrderKeyword[] $component, array $options = [] ) : string
$component OrderKeyword | OrderKeyword[] The component to be built.
$options array Parameters for building.
return string

parse() public static method

public static parse ( Parser $parser, TokensList $list, array $options = [] ) : OrderKeyword[]
$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.
return OrderKeyword[]

Property Details

$expr public_oe property

The expression that is used for ordering.
public Expression,SqlParser\Components $expr
return Expression

$type public_oe property

The order type.
public string $type
return string