| @@ 154-163 (lines=10) @@ | ||
| 151 | * |
|
| 152 | * @return self |
|
| 153 | */ |
|
| 154 | public function having($field, $condition = false, $operator = '=') |
|
| 155 | { |
|
| 156 | if (func_num_args() >= 2) { |
|
| 157 | $this->having->addCondition($field, $condition, $operator); |
|
| 158 | } else { |
|
| 159 | $this->having->addCondition($field); |
|
| 160 | } |
|
| 161 | ||
| 162 | return $this; |
|
| 163 | } |
|
| 164 | ||
| 165 | /** |
|
| 166 | * Unions another select query with this query. |
|
| @@ 21-30 (lines=10) @@ | ||
| 18 | * |
|
| 19 | * @return self |
|
| 20 | */ |
|
| 21 | public function where($field, $condition = false, $operator = '=') |
|
| 22 | { |
|
| 23 | if (func_num_args() >= 2) { |
|
| 24 | $this->where->addCondition($field, $condition, $operator); |
|
| 25 | } else { |
|
| 26 | $this->where->addCondition($field); |
|
| 27 | } |
|
| 28 | ||
| 29 | return $this; |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Adds a where or condition to the query. |
|
| @@ 41-50 (lines=10) @@ | ||
| 38 | * |
|
| 39 | * @return self |
|
| 40 | */ |
|
| 41 | public function orWhere($field, $condition = false, $operator = '=') |
|
| 42 | { |
|
| 43 | if (func_num_args() >= 2) { |
|
| 44 | $this->where->addConditionOr($field, $condition, $operator); |
|
| 45 | } else { |
|
| 46 | $this->where->addConditionOr($field); |
|
| 47 | } |
|
| 48 | ||
| 49 | return $this; |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * Adds a where not condition to the query. |
|