PHP 클래스 Doctrine\OrientDB\Query\Command

상속: implements Doctrine\OrientDB\Query\CommandInterface
파일 보기 프로젝트 열기: doctrine/orientdb-odm 1 사용 예제들

보호된 프로퍼티들

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