Пример #1
0
 public function compile()
 {
     if ($this->values instanceof CompilableInterface) {
         $values = $this->values->compile();
     } else {
         if (0 == count($this->values)) {
             throw new MissingValuesException("You must provide at least one value for the 'IN' expression!");
         }
         $values = implode(",", array_map(function ($element) {
             return "\"{$element}\"";
         }, $this->values));
     }
     return "{$this->field} IN ({$values})";
 }