|
|
@@ -127,7 +127,7 @@ class FunctionExpression extends QueryExpression
|
|
|
$parts = [];
|
|
|
foreach ($this->_conditions as $condition) {
|
|
|
if ($condition instanceof ExpressionInterface) {
|
|
|
- $condition = $condition->sql($generator);
|
|
|
+ $condition = sprintf('(%s)', $condition->sql($generator));
|
|
|
} elseif (is_array($condition)) {
|
|
|
$p = $generator->placeholder('param');
|
|
|
$generator->bind($p, $condition['value'], $condition['type']);
|