Merge cd92caa219
into 188bc07869
This commit is contained in:
commit
27ea68fb49
|
@ -27,6 +27,8 @@ use OCP\DB\QueryBuilder\ILiteral;
|
|||
use OCP\DB\QueryBuilder\IParameter;
|
||||
use OCP\DB\QueryBuilder\IQueryFunction;
|
||||
|
||||
use Doctrine\DBAL\Schema\Column;
|
||||
|
||||
class QuoteHelper {
|
||||
/**
|
||||
* @param array|string|ILiteral|IParameter|IQueryFunction $strings string, Literal or Parameter
|
||||
|
@ -57,6 +59,10 @@ class QuoteHelper {
|
|||
if ($string === null || $string === 'null' || $string === '*') {
|
||||
return $string;
|
||||
}
|
||||
|
||||
if ($string instanceof Column) {
|
||||
return $string->getName();
|
||||
}
|
||||
|
||||
if (!is_string($string)) {
|
||||
throw new \InvalidArgumentException('Only strings, Literals and Parameters are allowed');
|
||||
|
|
Loading…
Reference in New Issue