PHP Класс SqlParser\Components\Expression

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

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

Свойство Тип Описание
$alias string The alias of this expression.
$column string The name of the column.
$database string The name of this database.
$expr string The sub-expression.
$function mixed The name of the function.
$subquery string The type of subquery.
$table string The name of this table.

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

Метод Описание
__construct ( string $database = null, string $table = null, string $column = null, string $alias = null ) Constructor.
build ( Expression | Expression[] $component, array $options = [] ) : string
parse ( Parser $parser, TokensList $list, array $options = [] ) : Expression Possible options:

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

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

Syntax: new Expression('expr') new Expression('expr', 'alias') new Expression('database', 'table', 'column') new Expression('database', 'table', 'column', 'alias') If the database, table or column name is not required, pass an empty string.
public __construct ( string $database = null, string $table = null, string $column = null, string $alias = null )
$database string The name of the database or the the expression. the the expression.
$table string The name of the table or the alias of the expression. the alias of the expression.
$column string The name of the column.
$alias string The name of the alias.

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

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

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

field First field to be filled. If this is not specified, it takes the value of parseField. parseField Specifies the type of the field parsed. It may be database, table or column. These expressions may not include parentheses. breakOnAlias If not empty, breaks when the alias occurs (it is not included). breakOnParentheses If not empty, breaks when the first parentheses occurs. parenthesesDelimited If not empty, breaks after last parentheses occurred.
public static parse ( Parser $parser, TokensList $list, array $options = [] ) : Expression
$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.
Результат Expression

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

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

The alias of this expression.
public string $alias
Результат string

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

The name of the column.
public string $column
Результат string

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

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

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

The sub-expression.
public string $expr
Результат string

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

The name of the function.
public mixed $function
Результат mixed

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

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

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

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