- Fixed the QueryBuilder's escaping problem - adapters are now responsible for escaping identifiers.

- Added a MsSQL offset query fragment. There is still a problem with the way the Repository must act within another adapter.
This commit is contained in:
Dave Mc Nicoll committed 2020-04-14 09:47:09 -04:00
1 parent 3ff97f3bf0
commit 026a0f4f83
8 files changed
+75 -26

No files matched your search

+9 -3
View File
@@ -181,9 +181,16 @@ class Repository
return $this;
}
public function join(string $type, $table, $field, $value) : self
public function join(string $type, $table, $field, $value, ? string $alias = null) : self
{
$this->queryBuilder->join($type, $this->escapeTable($table), $field, $value);
$this->queryBuilder->join($type, $this->escapeTable($table), $field, $value, false, $alias);
return $this;
}
public function outerJoin(string $type, $table, $field, $value, ? string $alias = null) : self
{
$this->queryBuilder->join($type, $this->escapeTable($table), $field, $value, true, $alias);
return $this;
}
@@ -455,7 +462,6 @@ class Repository
$searchRequest->count = $searchRequest->filter( clone $this )
->wheres($searchRequest->wheres(), Query\Where::OPERATOR_EQUAL, Query\Where::CONDITION_AND)
->likes($searchRequest->likes(), Query\Where::CONDITION_OR)
->orders($searchRequest->orders())
->groups($searchRequest->groups())
->count();