* @package Mammut\DB\Sql */ trait Selective { /** * * @var Condition */ protected $where = NULL; /** * Defines a where clause * * @return $this */ public function where($predicate, $combination = iExprBool::OP_AND) { if($predicate instanceof Condition) $this->where = $predicate; else { if(is_null($this->where)) $this->where = new Condition(); $this->where->addPredicates($predicate, $combination); } $this->setup[self::WHERE] = $this->where; return $this; } }