function toDialectString(IDialect $dialect)
 {
     if (empty($this->set)) {
         return null;
     }
     $values = new SqlValueExpressionArray($this->set);
     $compiledSlices = array();
     $compiledSlices[] = '(';
     $compiledSlices[] = $this->subject->toDialectString($dialect);
     $compiledSlices[] = ')';
     $compiledSlices[] = $this->operator->toDialectString($dialect);
     $compiledSlices[] = '(';
     $compiledSlices[] = $values->toDialectString($dialect);
     $compiledSlices[] = ')';
     $compiledString = join(' ', $compiledSlices);
     return $compiledString;
 }
示例#2
0
 /**
  * Creates an instance of binary expression node, representing the construction: subject not in set
  *
  * @param mixed $subject logical subject
  * @param array $set set of value the subject should match
  *
  * SQL example:
  * @code
  * // "type" NOT IN ("completed", "pending")
  * Expression::notIn("type", array("completed", "pending"));
  * @endcode
  * @return InSetExpression
  */
 static function notIn($subject, $set)
 {
     return new InSetExpression($subject, $set, InSetLogicalOperator::notIn());
 }