PHP 클래스 SqlParser\Components\Expression

저자: Dan Ungureanu ([email protected])
상속: extends SqlParser\Component
파일 보기 프로젝트 열기: phpmyadmin/sql-parser 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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