- 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:
1 parent
3ff97f3bf0
commit
026a0f4f83
8 files changed
+75
-26
No files matched your search
@@ -79,11 +79,11 @@ class QueryBuilder
|
||||
{
|
||||
if ( ! $this->getFragment(Query\Update::class) ) {
|
||||
if ( $schema ) {
|
||||
$table = "\"$schema\".$table";
|
||||
$table = "$schema.$table";
|
||||
}
|
||||
|
||||
if ( $database ) {
|
||||
$table = "\"$database\".$table";
|
||||
$table = "$database.$table";
|
||||
}
|
||||
|
||||
$update = new Query\Update();
|
||||
@@ -121,7 +121,7 @@ class QueryBuilder
|
||||
public function from(string $table, ? string $alias = null, ? string $database = null, ? string $schema = null) : self
|
||||
{
|
||||
if ( $schema ) {
|
||||
$table = "\"$schema\".$table";
|
||||
$table = "$schema.$table";
|
||||
}
|
||||
|
||||
if ( $database ) {
|
||||
@@ -252,14 +252,18 @@ class QueryBuilder
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function join(string $type, /*string | QueryBuilder*/ $table, $field, $value, bool $outer = false) : self
|
||||
public function join(string $type, /*string | QueryBuilder*/ $table, $field, $value, bool $outer = false, ? string $alias = null) : self
|
||||
{
|
||||
$join = new Query\Join($this);
|
||||
|
||||
$this->push($join);
|
||||
|
||||
$join->set($type, $table, $field, $value);
|
||||
|
||||
$join->outer = $outer;
|
||||
|
||||
$join->alias = $alias;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user