Co-authored-by: Juan Pablo Vial <jpvialb@incoviba.cl>
Reviewed-on: #45
This commit is contained in:
2025-10-04 11:40:52 -03:00
parent 6ddc48ec60
commit 742de657c5
815 changed files with 62089 additions and 3287 deletions

View File

@ -81,6 +81,9 @@ class Insert extends Ideal\Query implements Define\Query\Insert
if ($value === (int) $value) {
return $value;
}
if (str_starts_with($value, ':')) {
return $value;
}
return "'{$value}'";
}, $this->values)) . ')';
}

View File

@ -64,10 +64,10 @@ class Select extends Ideal\Query implements Define\Query\Select
public function having(array|string $conditions): Select
{
if (is_string($conditions)) {
return $this->addCondition($conditions);
return $this->addHaving($conditions);
}
foreach ($conditions as $condition) {
$this->addCondition($condition);
$this->addHaving($condition);
}
return $this;
}
@ -126,7 +126,7 @@ class Select extends Ideal\Query implements Define\Query\Select
}
protected function addCondition(string $condition): Select
{
if (!isset($this->coditions)) {
if (!isset($this->conditions)) {
$this->conditions = [];
}
$this->conditions []= $condition;