Class StringExpression
String expression with collation.
Property Summary
-
$collation protected
string -
$returnType protected
stringThe type name this expression will return when executed
Method Summary
-
__construct() public
-
getCollation() public
Returns the string collation.
-
getReturnType() public
Gets the type of the value this object will generate.
-
setCollation() public
Sets the string collation.
-
setReturnType() public
Sets the type of the value this object will generate.
-
sql() public
Converts the Node into a SQL string fragment.
-
traverse() public
Iterates over each part of the expression recursively for every level of the expressions tree and executes the callback, passing as first parameter the instance of the expression currently being iterated.
Method Detail
__construct() ¶ public
__construct(string $string, string $collation)
Parameters
-
string$string String value
-
string$collation String collation
getReturnType() ¶ public
getReturnType(): string
Gets the type of the value this object will generate.
Returns
stringsetCollation() ¶ public
setCollation(string $collation): void
Sets the string collation.
Parameters
-
string$collation String collation
Returns
voidsetReturnType() ¶ public
setReturnType(string $type): $this
Sets the type of the value this object will generate.
Parameters
-
string$type The name of the type that is to be returned
Returns
$thissql() ¶ public
sql(Cake\Database\ValueBinder $binder): string
Converts the Node into a SQL string fragment.
Parameters
-
Cake\Database\ValueBinder$binder
Returns
stringtraverse() ¶ public
traverse(Closure $callback): $this
Iterates over each part of the expression recursively for every level of the expressions tree and executes the callback, passing as first parameter the instance of the expression currently being iterated.
Parameters
-
Closure$callback
Returns
$this