Some fixes / improvements
This commit is contained in:
@@ -4,6 +4,10 @@ namespace Driver\SQL\Condition;
|
||||
|
||||
class Compare extends Condition {
|
||||
|
||||
private string $operator;
|
||||
private string $column;
|
||||
private $value;
|
||||
|
||||
public function __construct($col, $val, $operator='=') {
|
||||
$this->operator = $operator;
|
||||
$this->column = $col;
|
||||
@@ -14,6 +18,4 @@ class Compare extends Condition {
|
||||
public function getValue() { return $this->value; }
|
||||
public function getOperator() { return $this->operator; }
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
}
|
||||
@@ -4,13 +4,11 @@ namespace Driver\SQL\Condition;
|
||||
|
||||
class CondAnd extends Condition {
|
||||
|
||||
private $conditions;
|
||||
private array $conditions;
|
||||
|
||||
public function __construct(...$conditions) {
|
||||
$this->conditions = $conditions;
|
||||
}
|
||||
|
||||
public function getConditions() { return $this->conditions; }
|
||||
}
|
||||
|
||||
?>
|
||||
}
|
||||
@@ -4,12 +4,12 @@ namespace Driver\SQL\Condition;
|
||||
|
||||
class CondBool extends Condition {
|
||||
|
||||
private $value;
|
||||
|
||||
public function __construct($val) {
|
||||
$this->value = $val;
|
||||
}
|
||||
|
||||
public function getValue() { return $this->value; }
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
}
|
||||
@@ -4,13 +4,11 @@ namespace Driver\SQL\Condition;
|
||||
|
||||
class CondOr extends Condition {
|
||||
|
||||
private $conditions;
|
||||
private array $conditions;
|
||||
|
||||
public function __construct(...$conditions) {
|
||||
$this->conditions = $conditions;
|
||||
}
|
||||
|
||||
public function getConditions() { return $this->conditions; }
|
||||
}
|
||||
|
||||
?>
|
||||
}
|
||||
@@ -4,6 +4,4 @@ namespace Driver\SQL\Condition;
|
||||
|
||||
abstract class Condition {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
}
|
||||
Reference in New Issue
Block a user