final class Expression implements Component (View source)

Parses a reference to an expression (column, table or database name, function call, mathematical expression, etc.).

Properties

string|null $database

The name of this database.

string|null $table

The name of this table.

string|null $column

The name of the column.

string|null $expr

The sub-expression.

string|null $alias

The alias of this expression.

string|null $function

The name of the function.

string|null $subquery

The type of subquery.

Methods

__construct(string|null $database = null, string|null $table = null, string|null $column = null, string|null $alias = null)

Syntax: new Expression('expr') new Expression('expr', 'alias') new Expression('database', 'table', 'column') new Expression('database', 'table', 'column', 'alias')

string
build()

Builds the string representation of a component of this type.

string
__toString()

No description

Details

__construct(string|null $database = null, string|null $table = null, string|null $column = null, string|null $alias = null)

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.

Parameters

string|null $database

The name of the database or the expression.

string|null $table

The name of the table or the alias of the expression.

string|null $column

the name of the column

string|null $alias

the name of the alias

string build()

Builds the string representation of a component of this type.

In other words, this function represents the inverse function of {\PhpMyAdmin\SqlParser\Component::parse()}.

Return Value

string

string __toString()

No description

Return Value

string