- Fixed conflicts
This commit is contained in:
commit
325704260b
31 files changed
+632
-127
No files matched your search
@@ -329,7 +329,7 @@ class QueryBuilder implements Query\QueryBuilderInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function create(array $fieldlist, string $table, ? string $database = null, ? string $schema = null) : self
|
||||
public function create(Adapter\AdapterInterface $adapter, array $fieldlist, string $table, ? string $database = null, ? string $schema = null) : self
|
||||
{
|
||||
if ( null === $this->getFragment(Query\Create::class) ) {
|
||||
if ( $schema ) {
|
||||
@@ -340,7 +340,7 @@ class QueryBuilder implements Query\QueryBuilderInterface
|
||||
$table = "$database.$table";
|
||||
}
|
||||
|
||||
$create = new Query\Create();
|
||||
$create = new Query\Create($adapter);
|
||||
$this->push($create);
|
||||
|
||||
$create->fieldList = $fieldlist;
|
||||
@@ -353,7 +353,7 @@ class QueryBuilder implements Query\QueryBuilderInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function alter(array $fieldlist, string $table, ? string $database = null, ? string $schema = null) : self
|
||||
public function alter(Adapter\AdapterInterface $adapter, array $fieldlist, string $table, ? string $database = null, ? string $schema = null) : self
|
||||
{
|
||||
if ( null === $this->getFragment(Query\Create::class) ) {
|
||||
if ( $schema ) {
|
||||
@@ -364,7 +364,7 @@ class QueryBuilder implements Query\QueryBuilderInterface
|
||||
$table = "$database.$table";
|
||||
}
|
||||
|
||||
$alter = new Query\Alter();
|
||||
$alter = new Query\Alter($adapter);
|
||||
$this->push($alter);
|
||||
|
||||
$alter->fieldList = $fieldlist;
|
||||
@@ -406,7 +406,7 @@ class QueryBuilder implements Query\QueryBuilderInterface
|
||||
$sql = [];
|
||||
|
||||
usort($this->queryStack, function($q1, $q2) {
|
||||
return $q1->order() <=> $q2->order();
|
||||
return (float) $q1->order <=> (float) $q2->order;
|
||||
});
|
||||
|
||||
foreach($this->queryStack as $fragment) {
|
||||
@@ -486,13 +486,12 @@ class QueryBuilder implements Query\QueryBuilderInterface
|
||||
{
|
||||
$this->values = $values;
|
||||
}
|
||||
|
||||
protected function nextJoinOrder() : float
|
||||
{
|
||||
$next = 0;
|
||||
|
||||
foreach($this->getFragments(Query\Join::class) as $join) {
|
||||
$next = max($next, $join->joinOrder);
|
||||
$next = max($next, $join->joinOrder - Query\Join::ORDER_VALUE);
|
||||
}
|
||||
|
||||
return $next + 1;
|
||||
|
||||
Reference in new issue
Block a user