|
|
@@ -95,6 +95,7 @@ class FunctionExpression extends QueryExpression
|
|
|
public function add($params, $types = [], $prepend = false)
|
|
|
{
|
|
|
$put = $prepend ? 'array_unshift' : 'array_push';
|
|
|
+ $typeMap = $this->typeMap()->types($types);
|
|
|
foreach ($params as $k => $p) {
|
|
|
if ($p === 'literal') {
|
|
|
$put($this->_conditions, $k);
|
|
|
@@ -105,9 +106,7 @@ class FunctionExpression extends QueryExpression
|
|
|
$put($this->_conditions, $p);
|
|
|
continue;
|
|
|
}
|
|
|
-
|
|
|
- $type = isset($types[$k]) ? $types[$k] : null;
|
|
|
- $put($this->_conditions, ['value' => $p, 'type' => $type]);
|
|
|
+ $put($this->_conditions, ['value' => $p, 'type' => $typeMap->type($k)]);
|
|
|
}
|
|
|
|
|
|
return $this;
|