| @@ 507-518 (lines=12) @@ | ||
| 504 | * @param array $where |
|
| 505 | * @return string |
|
| 506 | */ |
|
| 507 | protected function whereNotInRaw(Builder $query, $where) |
|
| 508 | { |
|
| 509 | if (! empty($where['values'])) { |
|
| 510 | if (is_array($where['values']) && count($where['values']) > 1000) { |
|
| 511 | return $this->resolveClause($where['column'], $where['values'], 'not in'); |
|
| 512 | } else { |
|
| 513 | return $this->wrap($where['column']).' not in ('.implode(', ', $where['values']).')'; |
|
| 514 | } |
|
| 515 | } |
|
| 516 | ||
| 517 | return '1 = 1'; |
|
| 518 | } |
|
| 519 | ||
| 520 | /** |
|
| 521 | * Compile a "where in raw" clause. |
|
| @@ 529-540 (lines=12) @@ | ||
| 526 | * @param array $where |
|
| 527 | * @return string |
|
| 528 | */ |
|
| 529 | protected function whereInRaw(Builder $query, $where) |
|
| 530 | { |
|
| 531 | if (! empty($where['values'])) { |
|
| 532 | if (is_array($where['values']) && count($where['values']) > 1000) { |
|
| 533 | return $this->resolveClause($where['column'], $where['values'], 'in'); |
|
| 534 | } else { |
|
| 535 | return $this->wrap($where['column']).' in ('.implode(', ', $where['values']).')'; |
|
| 536 | } |
|
| 537 | } |
|
| 538 | ||
| 539 | return '0 = 1'; |
|
| 540 | } |
|
| 541 | ||
| 542 | private function resolveClause($column, $values, $type) |
|
| 543 | { |
|