@@ 255-265 (lines=11) @@ | ||
252 | * |
|
253 | * @return $this |
|
254 | */ |
|
255 | public function andWhere($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS) |
|
256 | { |
|
257 | if (strpos($field, '.') > 0) { |
|
258 | $newValues = $this->whereFieldJoin($field, $value, $operation); |
|
259 | $alias = $newValues['alias']; |
|
260 | $field = $newValues['field']; |
|
261 | } |
|
262 | $this->queryBuilder->andWhere($this->makeExpression($field, $operation, $value, $alias)); |
|
263 | ||
264 | return $this; |
|
265 | } |
|
266 | ||
267 | /** |
|
268 | * Add a "or where" filter. |
|
@@ 276-286 (lines=11) @@ | ||
273 | * |
|
274 | * @return $this |
|
275 | */ |
|
276 | public function orWhere($field, $operation, $value = null, $alias = self::DEFAULT_TABLE_ALIAS) |
|
277 | { |
|
278 | if (strpos($field, '.') > 0) { |
|
279 | $newValues = $this->whereFieldJoin($field, $value, $operation); |
|
280 | $alias = $newValues['alias']; |
|
281 | $field = $newValues['field']; |
|
282 | } |
|
283 | $this->queryBuilder->orWhere($this->makeExpression($field, $operation, $value, $alias)); |
|
284 | ||
285 | return $this; |
|
286 | } |
|
287 | ||
288 | /** |
|
289 | * Add a join filter. |
|
@@ 388-399 (lines=12) @@ | ||
385 | * @param string $field |
|
386 | * @param string $order |
|
387 | */ |
|
388 | public function addOrderBy($field, $order = 'ASC') |
|
389 | { |
|
390 | $alias = self::DEFAULT_TABLE_ALIAS; |
|
391 | if (strpos($field, '.') > 0) { |
|
392 | $newValues = $this->whereFieldJoin($field); |
|
393 | $alias = $newValues['alias']; |
|
394 | $field = $newValues['field']; |
|
395 | } |
|
396 | $this->queryBuilder->addOrderBy($this->getFullFieldName($field, $alias), $order); |
|
397 | ||
398 | return $this; |
|
399 | } |
|
400 | ||
401 | /** |
|
402 | * Add a "order by" filter. |