2020-08-31 12:38:32 +08:00
|
|
|
<?php
|
2020-10-29 18:17:25 +08:00
|
|
|
declare(strict_types=1);
|
2020-08-31 12:38:32 +08:00
|
|
|
|
|
|
|
|
namespace Database\Condition;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class NotInCondition
|
|
|
|
|
* @package Database\Condition
|
|
|
|
|
*/
|
|
|
|
|
class NotInCondition extends Condition
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function builder()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
$format = array_filter($this->format($this->value));
|
|
|
|
|
if (empty($format)) {
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return '`' . $this->column . '` not in(' . implode(',', $format) . ')';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|