SQL expression rewrite, Pagination, some frontend stuff
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Core\Driver\SQL\Condition;
|
||||
|
||||
use Core\Driver\SQL\SQL;
|
||||
|
||||
class CondBool extends Condition {
|
||||
|
||||
private $value;
|
||||
@@ -12,4 +14,11 @@ class CondBool extends Condition {
|
||||
|
||||
public function getValue() { return $this->value; }
|
||||
|
||||
function getExpression(SQL $sql, array &$params): string {
|
||||
if (is_string($this->value)) {
|
||||
return $sql->columnName($this->value);
|
||||
} else {
|
||||
return $sql->addValue($this->value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user