This commit is contained in:
2023-04-07 18:23:27 +08:00
parent 6d122c4ae1
commit 5d41c7219f
9 changed files with 339 additions and 328 deletions
+2 -1
View File
@@ -15,11 +15,12 @@ class NotInCondition extends Condition
/**
* @return string|null
* @throws \Exception
*/
#[Pure] public function builder(): ?string
{
if (!is_array($this->value)) {
return null;
throw new \Exception('Builder data by a empty string. need array');
}
$value = '\'' . implode('\',\'', $this->value) . '\'';
return '`' . $this->column . '` not in(' . $value . ')';