PHP Класс Doctrine\OrientDB\Query\Command

Наследование: implements Doctrine\OrientDB\Query\CommandInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$escapeValidator
$formatter
$formatters
$ridValidator
$tokens

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

Метод Описание
__construct ( ) Builds a new object, creating the SQL statement from the class SCHEMA and initializing the tokens.
andWhere ( string $condition, string $value = null ) : Command Sets a where token using the AND operator.
canHydrate ( ) : boolean Returns whether this query, when executed, should have the collection hydrated.
from ( array $target, boolean $append = true ) Sets the token for the from clause. You can $append your values.
getRaw ( ) : string Returns the raw SQL query incapsulated by the current object.
getTokenValue ( string $token ) : mixed Returns the value of a token.
getTokens ( ) : array Analyzing the command's SCHEMA, this method returns all the tokens allocable in the command.
getValidReturnTypes ( ) : array() Returns the array of valid params for the Return clause.
orWhere ( string $condition, string $value = null ) : Command Sets a where token using the OR operator.
resetWhere ( ) : true Deletes all the WHERE conditions in the current command.
returns ( $returns ) Sets the Returns token
setFormatter ( Doctrine\OrientDB\Query\Formatter\QueryInterface $formatter ) Sets the internal query formatter object.
setToken ( string $token, string $tokenValue, boolean $append = false, boolean $first = false ) : true Sets a single value for a token,
where ( string $condition, mixed $value = null, boolean $append = false, string $clause = "WHERE" ) Adds a WHERE conditions into the current query.

Защищенные методы

Метод Описание
appendToken ( string $token, mixed $values, boolean $first = false ) Appends a token to the query, without deleting existing values for the given $token.
appendTokenAsInteger ( string $token, string $key, mixed $value ) Appends $value to the query $token.
appendTokenAsString ( string $token, string $key, mixed $value ) Appends $value to the query $token, using $key to identify the $value in the token array.
checkToken ( string $token ) : mixed Checks if a token is set, returning it if it is.
clearToken ( string $token ) Clears the value of a token.
formatWhereConditionWithMultipleTokens ( string $condition, array $values, Escaper $validator ) : string Substitutes multiple tokens ($values) in the WHERE $condition.
getFormatter ( ) : Doctrine\OrientDB\Query\Formatter\QueryInterface Returns a brand new instance of a Formatter in order to format query tokens.
getSchema ( ) Returns the schema template for the command.
getTokenFormatter ( string $token ) : Array Returns the formatter for a particular token.
getTokenFormatters ( ) : Array Returns the formatters for this query's tokens.
getTokenReplaces ( ) : array Returns the values to replace command's schema tokens.
getValidStatement ( ) : string Build the command replacing schema tokens with actual values and cleaning the command synthax.
replaceTokens ( string $statement ) : string Replaces the tokens in the command's schema with their actual values in the current object.
setTokenValues ( string $token, array $tokenValues, boolean $append = true, boolean $first = false ) : true Sets the values of a token, and can be appended with the given $append.
tokenize ( string $token ) : string Tokenizes a string.
unsetToken ( string $token ) Deletes a token.

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

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

Builds a new object, creating the SQL statement from the class SCHEMA and initializing the tokens.
public __construct ( )

andWhere() публичный метод

If the $condition contains a "?", it will be replaced by the $value.
public andWhere ( string $condition, string $value = null ) : Command
$condition string
$value string
Результат Command

appendToken() защищенный метод

Appends a token to the query, without deleting existing values for the given $token.
protected appendToken ( string $token, mixed $values, boolean $first = false )
$token string
$values mixed
$first boolean

appendTokenAsInteger() защищенный метод

Appends $value to the query $token.
protected appendTokenAsInteger ( string $token, string $key, mixed $value )
$token string
$key string
$value mixed

appendTokenAsString() защищенный метод

With this method you set a token value and can retrieve it by its key.
protected appendTokenAsString ( string $token, string $key, mixed $value )
$token string
$key string
$value mixed

canHydrate() публичный метод

The default is true
public canHydrate ( ) : boolean
Результат boolean

checkToken() защищенный метод

Checks if a token is set, returning it if it is.
protected checkToken ( string $token ) : mixed
$token string
Результат mixed

clearToken() защищенный метод

Clears the value of a token.
protected clearToken ( string $token )
$token string

formatWhereConditionWithMultipleTokens() защищенный метод

Substitutes multiple tokens ($values) in the WHERE $condition.
protected formatWhereConditionWithMultipleTokens ( string $condition, array $values, Escaper $validator ) : string
$condition string
$values array
$validator Doctrine\OrientDB\Query\Validator\Escaper
Результат string

from() публичный метод

Sets the token for the from clause. You can $append your values.
public from ( array $target, boolean $append = true )
$target array
$append boolean

getFormatter() защищенный метод

Returns a brand new instance of a Formatter in order to format query tokens.
protected getFormatter ( ) : Doctrine\OrientDB\Query\Formatter\QueryInterface
Результат Doctrine\OrientDB\Query\Formatter\QueryInterface

getRaw() публичный метод

Returns the raw SQL query incapsulated by the current object.
public getRaw ( ) : string
Результат string

getSchema() защищенный метод

Returns the schema template for the command.
protected getSchema ( )

getTokenFormatter() защищенный метод

Returns the formatter for a particular token.
protected getTokenFormatter ( string $token ) : Array
$token string
Результат Array

getTokenFormatters() защищенный метод

Returns the formatters for this query's tokens.
protected getTokenFormatters ( ) : Array
Результат Array

getTokenReplaces() защищенный метод

Returns the values to replace command's schema tokens.
protected getTokenReplaces ( ) : array
Результат array

getTokenValue() публичный метод

Returns the value of a token.
public getTokenValue ( string $token ) : mixed
$token string
Результат mixed

getTokens() публичный метод

Analyzing the command's SCHEMA, this method returns all the tokens allocable in the command.
public getTokens ( ) : array
Результат array

getValidReturnTypes() публичный метод

Use this function to support the Return clause by overriding and returing a list in the subclass
public getValidReturnTypes ( ) : array()
Результат array()

getValidStatement() защищенный метод

Build the command replacing schema tokens with actual values and cleaning the command synthax.
protected getValidStatement ( ) : string
Результат string

orWhere() публичный метод

If the $condition contains a "?", it will be replaced by the $value.
public orWhere ( string $condition, string $value = null ) : Command
$condition string
$value string
Результат Command

replaceTokens() защищенный метод

Replaces the tokens in the command's schema with their actual values in the current object.
protected replaceTokens ( string $statement ) : string
$statement string
Результат string

resetWhere() публичный метод

Deletes all the WHERE conditions in the current command.
public resetWhere ( ) : true
Результат true

returns() публичный метод

Sets the Returns token
public returns ( $returns )

setFormatter() публичный метод

Sets the internal query formatter object.
public setFormatter ( Doctrine\OrientDB\Query\Formatter\QueryInterface $formatter )
$formatter Doctrine\OrientDB\Query\Formatter\QueryInterface

setToken() публичный метод

Sets a single value for a token,
public setToken ( string $token, string $tokenValue, boolean $append = false, boolean $first = false ) : true
$token string
$tokenValue string
$append boolean
$first boolean
Результат true

setTokenValues() защищенный метод

Sets the values of a token, and can be appended with the given $append.
protected setTokenValues ( string $token, array $tokenValues, boolean $append = true, boolean $first = false ) : true
$token string
$tokenValues array
$append boolean
$first boolean
Результат true

tokenize() защищенный метод

Tokenizes a string.
protected tokenize ( string $token ) : string
$token string
Результат string

unsetToken() защищенный метод

Deletes a token.
protected unsetToken ( string $token )
$token string

where() публичный метод

Adds a WHERE conditions into the current query.
public where ( string $condition, mixed $value = null, boolean $append = false, string $clause = "WHERE" )
$condition string
$value mixed
$append boolean
$clause string

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

$escapeValidator защищенное свойство

protected $escapeValidator

$formatter защищенное свойство

protected $formatter

$formatters защищенное свойство

protected $formatters

$ridValidator защищенное свойство

protected $ridValidator

$tokens защищенное свойство

protected $tokens