Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Rahul Patel committed Apr 25, 2019
1 parent f2189a0 commit d73685a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 227 deletions.
34 changes: 18 additions & 16 deletions src/core/Directus/Database/Query/Builder.php
Expand Up @@ -267,19 +267,19 @@ public function orWhereIn($column, $values, $not = false)
*
* @return Builder
*/
public function whereNotIn($column, array $values)
public function whereNotIn($column, $values, $not = false, $logical = 'and')
{
return $this->whereIn($column, $values, true);
return $this->whereIn($column, $values, true, $logical);
}

public function whereBetween($column, array $values, $not = false, $logical = 'and')
{
return $this->where($column, 'between', $values, $not, $logical);
}

public function whereNotBetween($column, array $values)
public function whereNotBetween($column, $values, $not = false, $logical = 'and')
{
return $this->whereBetween($column, $values, true);
return $this->whereBetween($column, $values, true, $logical);
}

public function whereEqualTo($column, $value, $not = false, $logical = 'and')
Expand All @@ -292,29 +292,29 @@ public function orWhereEqualTo($column, $value, $not = false)
return $this->where($column, '=', $value, $not, 'or');
}

public function whereNotEqualTo($column, $value)
public function whereNotEqualTo($column, $value, $not = false, $logical = 'and')
{
return $this->whereEqualTo($column, $value, true);
return $this->whereEqualTo($column, $value, true, $logical);
}

public function whereLessThan($column, $value)
public function whereLessThan($column, $value, $not = false, $logical = 'and')
{
return $this->where($column, '<', $value);
return $this->where($column, '<', $value, $not, $logical);
}

public function whereLessThanOrEqual($column, $value)
public function whereLessThanOrEqual($column, $value, $not = false, $logical = 'and')
{
return $this->where($column, '<=', $value);
return $this->where($column, '<=', $value, $not, $logical);
}

public function whereGreaterThan($column, $value)
public function whereGreaterThan($column, $value, $not = false, $logical = 'and')
{
return $this->where($column, '>', $value);
return $this->where($column, '>', $value, $not, $logical);
}

public function whereGreaterThanOrEqual($column, $value)
public function whereGreaterThanOrEqual($column, $value, $not = false, $logical = 'and')
{
return $this->where($column, '>=', $value);
return $this->where($column, '>=', $value, $not, $logical);
}

public function whereNull($column, $not = false, $logical = 'and')
Expand Down Expand Up @@ -342,9 +342,9 @@ public function orWhereLike($column, $value, $not = false)
return $this->whereLike($column, $value, $not, 'or');
}

public function whereNotLike($column, $value)
public function whereNotLike($column, $value, $not = false, $logical = 'and')
{
return $this->whereLike($column, $value, true);
return $this->whereLike($column, $value, true, $logical);
}

public function whereAll($column, $table, $columnLeft, $columnRight, $values)
Expand Down Expand Up @@ -759,6 +759,8 @@ protected function buildConditionExpression($condition)
$operator = $notChar . $condition['operator'];

$column = $condition['column'];
echo "hiii<pre>";
print_r($column);
$identifier = $this->getIdentifier($column);
$value = $condition['value'];

Expand Down
55 changes: 0 additions & 55 deletions tests/api/AuthTest.php

This file was deleted.

156 changes: 0 additions & 156 deletions tests/api/CollectionTest.php

This file was deleted.

0 comments on commit d73685a

Please sign in to comment.