This repository was archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expressions
Renaud Guillard edited this page Jan 10, 2022
·
2 revisions
Suitable for constant statements
Timestamp must follow the ISO 8601 format with the following restrictions
- The midnight notation 24:00 is not supported
- Fractional time is only accepted for seconds
Suitable for complex and programatically built statements.
- Literal (string, number, bool, etc.)
- Statement parameter
- Structure element references
- Function
- Unary operators
- Binary operators
- Case
- Between
[ 'operator' => [ operand1, operand2 ] ]
# Binary
[ '=' => [ left-expression, right-expression ] ]
# Unary
[ 'not' => [ expression ] ]
[ 'function-name()' => [arg1, arg2, ...] ]
$query->column (
'expression', // Evaluable expression string
[ 'expression', 'alias' ],
[ 'polish' => [ ... ] ], // Polish notation expression
[ ['polish' => [ ... ]], 'alias' ]
);
$query->where (
'expression', // Evaluable expression string
[ 'column => 'expression' ], // Shorthand for [ '=' => [ 'column', 'expression' ]]
);
// ? Parameters => use expressions
// ? Functions => use expressions