This commit is contained in:
2021-08-11 15:03:28 +08:00
commit f2a9fc473e
45 changed files with 6778 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
<?php
declare(strict_types=1);
namespace Database\Condition;
use JetBrains\PhpStorm\Pure;
/**
* Class NotInCondition
* @package Database\Condition
*/
class NotInCondition extends Condition
{
/**
* @return string|null
*/
#[Pure] public function builder(): ?string
{
if (!is_array($this->value)) {
return null;
}
$value = '\'' . implode('\',\'', $this->value) . '\'';
return '`' . $this->column . '` not in(' . $value . ')';
}
}