NodeFunction
Table of Contents
Methods
- as() : AliasOperator
- Construct an alias for the current node
- asc() : AscOperator
- Construct an ascending order for the current node
- cast() : Cast
- Cast the current node to a given type
- coalesce() : mixed
- desc() : DescOperator
- Construct a descending order for the current node
- eq() : EqualityOperator|IsNullOperator
- Construct a '=' boolean expression
- firstValue() : mixed
- Construct a FIRST_VALUE function from the current node
- in() : InOperator|NotInOperator
- Construct a 'IN' boolean expression
- json() : mixed
- lastValue() : mixed
- Construct a LAST_VALUE function from the current node
- neq() : NotEqualityOperator|IsNotNullOperator
- Construct a '!=' boolean expression
- notIn() : NotInOperator|InOperator
- Construct a 'NOT IN' boolean expression
- repeat() : Repeat
- Repeat the current node $times times
- when() : WhenNode
- Construct a CASE expression from the current node and define the first WHEN clause with a given condition
Methods
as()
Construct an alias for the current node
public
as(mixed $alias) : AliasOperator
Parameters
- $alias : mixed
-
the alias
Return values
AliasOperator —the alias node
asc()
Construct an ascending order for the current node
public
asc() : AscOperator
Return values
AscOperator —the ascending order node
cast()
Cast the current node to a given type
public
cast(Type $type) : Cast
Parameters
- $type : Type
-
the type to cast to
Return values
Cast —the cast node
coalesce()
public
coalesce(mixed $args) : mixed
Parameters
- $args : mixed
desc()
Construct a descending order for the current node
public
desc() : DescOperator
Return values
DescOperator —the descending order node
eq()
Construct a '=' boolean expression
public
eq(mixed $other) : EqualityOperator|IsNullOperator
Parameters
- $other : mixed
-
the other operand
Return values
EqualityOperator|IsNullOperator —the equality node
firstValue()
Construct a FIRST_VALUE function from the current node
public
firstValue([mixed $groups = [] ][, mixed $orders = [] ][, mixed $rows = [] ][, mixed $nullsDirective = 0 ]) : mixed
Parameters
- $groups : mixed = []
-
values to partitioned by (for window functions)
- $orders : mixed = []
-
values to order with (for window functions)
- $rows : mixed = []
-
values to bound with (for window functions)
- $nullsDirective : mixed = 0
in()
Construct a 'IN' boolean expression
public
in([mixed $others = NULL ]) : InOperator|NotInOperator
Parameters
- $others : mixed = NULL
-
the other operands
Return values
InOperator|NotInOperatorjson()
public
json() : mixed
lastValue()
Construct a LAST_VALUE function from the current node
public
lastValue([mixed $groups = [] ][, mixed $orders = [] ][, mixed $rows = [] ][, mixed $nullsDirective = 0 ]) : mixed
Parameters
- $groups : mixed = []
-
values to partitioned by (for window functions)
- $orders : mixed = []
-
values to order with (for window functions)
- $rows : mixed = []
-
values to bound with (for window functions)
- $nullsDirective : mixed = 0
neq()
Construct a '!=' boolean expression
public
neq(mixed $other) : NotEqualityOperator|IsNotNullOperator
Parameters
- $other : mixed
-
the other operand
Return values
NotEqualityOperator|IsNotNullOperatornotIn()
Construct a 'NOT IN' boolean expression
public
notIn([mixed $others = NULL ]) : NotInOperator|InOperator
Parameters
- $others : mixed = NULL
-
the other operands
Return values
NotInOperator|InOperatorrepeat()
Repeat the current node $times times
public
repeat(mixed $times) : Repeat
Parameters
- $times : mixed
-
the number of times to repeat the current node
Return values
Repeat —the repeated node
when()
Construct a CASE expression from the current node and define the first WHEN clause with a given condition
public
when(mixed $condition) : WhenNode
Parameters
- $condition : mixed
Return values
WhenNode —the case node