ajout méthodes random,index dans la collection, ajout clause distinct, whereNull , whereNotNull dans le querybuilder
This commit is contained in:
@@ -25,9 +25,21 @@ class Expression
|
||||
if ($operator == "between" && count($this->value) == 2) {
|
||||
return "(" . $this->condition . " " . $this->operator . " ? AND ? )";
|
||||
}
|
||||
if ($operator == "notnull") {
|
||||
return "(" . $this->condition . " IS NOT NULL )";
|
||||
}
|
||||
if ($operator == "isnull") {
|
||||
return "(" . $this->condition . " IS NULL )";
|
||||
}
|
||||
return "(" . $this->condition . " " . $this->operator . " ? )";
|
||||
}
|
||||
|
||||
public function hasData()
|
||||
{
|
||||
$operator = trim(strtolower($this->operator));
|
||||
return (in_array($operator, ["isnull","notnull"])) ? false : true;
|
||||
}
|
||||
|
||||
public function getCondition()
|
||||
{
|
||||
return $this->condition;
|
||||
|
||||
Reference in New Issue
Block a user