accept array as parameter in getConcatExpression #275

Closed
wants to merge 3 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+14 −2
Diff settings

Always

Just for now

@@ -768,7 +768,12 @@ public function getSubstringExpression($value, $from, $length = null)
*/
public function getConcatExpression()
{
- return join(' || ' , func_get_args());
+ $args = func_get_args();
+
+ if(is_array($args[0])){
+ $args = $args[0];
+ }
+ return join(' || ' , $args);
}
/**
@@ -86,6 +86,10 @@ public function getLocateExpression($str, $substr, $startPos = false)
public function getConcatExpression()
{
$args = func_get_args();
+ if(is_array($args[0])){
+ $args = $args[0];
+ }
+
return 'CONCAT(' . join(', ', (array) $args) . ')';
}
@@ -543,7 +543,10 @@ public function getTrimExpression($str, $pos = self::TRIM_UNSPECIFIED, $char = f
public function getConcatExpression()
{
$args = func_get_args();
-
+
+ if(is_array($args[0])){
+ $args = $args[0];
+ }
return '(' . implode(' + ', $args) . ')';
}