Skip to content

Commit

Permalink
Merge pull request #143 from skipperbent/v4-development
Browse files Browse the repository at this point in the history
4.15.3
  • Loading branch information
skipperbent authored Jun 7, 2021
2 parents 92db7bc + 77ff953 commit aa79d50
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 37 deletions.
2 changes: 1 addition & 1 deletion .phpunit.result.cache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
C:37:"PHPUnit\Runner\DefaultTestResultCache":7966:{a:2:{s:7:"defects";a:55:{s:39:"Pecee\Pixie\QueryBuilderTest::testAlias";i:3;s:45:"Pecee\Pixie\QueryBuilderTest::testDeleteQuery";i:3;s:50:"Pecee\Pixie\QueryBuilderTest::testEventPropagation";i:4;s:51:"Pecee\Pixie\QueryBuilderTest::testInsertIgnoreQuery";i:4;s:65:"Pecee\Pixie\QueryBuilderTest::testInsertOnDuplicateKeyUpdateQuery";i:4;s:45:"Pecee\Pixie\QueryBuilderTest::testInsertQuery";i:4;s:70:"Pecee\Pixie\QueryBuilderTest::testIsPossibleToUseSubqueryInWhereClause";i:3;s:73:"Pecee\Pixie\QueryBuilderTest::testIsPossibleToUseSubqueryInWhereNotClause";i:3;s:52:"Pecee\Pixie\QueryBuilderTest::testOrderByFlexibility";i:4;s:61:"Pecee\Pixie\QueryBuilderTest::testRawStatementsWithinCriteria";i:3;s:61:"Pecee\Pixie\QueryBuilderTest::testRawStatementWithinStatement";i:3;s:58:"Pecee\Pixie\QueryBuilderTest::testRawStatementWithinSelect";i:3;s:46:"Pecee\Pixie\QueryBuilderTest::testReplaceQuery";i:4;s:47:"Pecee\Pixie\QueryBuilderTest::testSelectAliases";i:4;s:48:"Pecee\Pixie\QueryBuilderTest::testSelectDistinct";i:4;s:62:"Pecee\Pixie\QueryBuilderTest::testSelectDistinctAndSelectCalls";i:4;s:64:"Pecee\Pixie\QueryBuilderTest::testSelectDistinctWithSingleColumn";i:4;s:51:"Pecee\Pixie\QueryBuilderTest::testSelectFlexibility";i:4;s:45:"Pecee\Pixie\QueryBuilderTest::testSelectQuery";i:3;s:71:"Pecee\Pixie\QueryBuilderTest::testSelectQueryWithNestedCriteriaAndJoins";i:3;s:53:"Pecee\Pixie\QueryBuilderTest::testSelectQueryWithNull";i:3;s:55:"Pecee\Pixie\QueryBuilderTest::testSelectWithQueryEvents";i:3;s:52:"Pecee\Pixie\QueryBuilderTest::testStandaloneWhereNot";i:3;s:45:"Pecee\Pixie\QueryBuilderTest::testUpdateQuery";i:3;s:53:"Pecee\Pixie\QueryBuilderTest::testDeleteAdvancedQuery";i:3;s:53:"Pecee\Pixie\QueryBuilderTest::testUpdateAdvancedQuery";i:3;s:46:"Pecee\Pixie\QueryBuilderTest::testFromSubQuery";i:3;s:44:"Pecee\Pixie\QueryBuilderTest::testTableAlias";i:4;s:54:"Pecee\Pixie\QueryBuilderTest::testWhereNotNullSubQuery";i:4;s:43:"Pecee\Pixie\QueryBuilderTest::testJoinUsing";i:3;s:55:"Pecee\Pixie\QueryBuilderTest::testJoinQueryBuilderUsing";i:3;s:60:"Pecee\Pixie\CustomExceptionsTest::testTableNotFoundException";i:4;s:61:"Pecee\Pixie\CustomExceptionsTest::testColumnNotFoundException";i:4;s:61:"Pecee\Pixie\CustomExceptionsTest::testDuplicateEntryException";i:4;s:75:"Pecee\Pixie\CustomExceptionsTest::testQueryAggregateColumnNotFoundException";i:4;s:57:"Pecee\Pixie\CustomExceptionsTest::testForeignKeyException";i:4;s:54:"Pecee\Pixie\CustomExceptionsTest::testNotNullException";i:4;s:53:"Pecee\Pixie\QueryBuilderAggregateTest::testQueryCount";i:4;s:59:"Pecee\Pixie\QueryBuilderAggregateTest::testSqliteQueryCount";i:4;s:51:"Pecee\Pixie\QueryBuilderAggregateTest::testQuerySum";i:4;s:57:"Pecee\Pixie\QueryBuilderAggregateTest::testSqliteQuerySum";i:4;s:55:"Pecee\Pixie\QueryBuilderAggregateTest::testQueryAverage";i:4;s:61:"Pecee\Pixie\QueryBuilderAggregateTest::testSqliteQueryAverage";i:4;s:50:"Pecee\Pixie\TransactionTest::testTransactionResult";i:4;s:51:"Pecee\Pixie\TransactionTest::testNestedTransactions";i:4;s:58:"Pecee\Pixie\TransactionTest::testTransactionMultipleInsert";i:4;s:42:"Pecee\Pixie\TransactionTest::testLastQuery";i:3;s:47:"Pecee\Pixie\QueryBuilderTest::testRawExpression";i:3;s:44:"Pecee\Pixie\QueryBuilder::testFalseBoolWhere";i:3;s:43:"Pecee\Pixie\QueryBuilder::testNullableWhere";i:3;s:42:"Pecee\Pixie\QueryBuilder::testWhereBetween";i:3;s:35:"Pecee\Pixie\QueryBuilder::testUnion";i:3;s:43:"Pecee\Pixie\QueryBuilder::testUnionSubQuery";i:3;s:44:"Pecee\Pixie\QueryBuilder::testQueryOverwrite";i:3;s:41:"Pecee\Pixie\QueryBuilder::testRemoveQuery";i:3;}s:5:"times";a:65:{s:39:"Pecee\Pixie\QueryBuilderTest::testAlias";d:0.001;s:45:"Pecee\Pixie\QueryBuilderTest::testDeleteQuery";d:0.001;s:50:"Pecee\Pixie\QueryBuilderTest::testEventPropagation";d:0.001;s:51:"Pecee\Pixie\QueryBuilderTest::testInsertIgnoreQuery";d:0.001;s:65:"Pecee\Pixie\QueryBuilderTest::testInsertOnDuplicateKeyUpdateQuery";d:0;s:45:"Pecee\Pixie\QueryBuilderTest::testInsertQuery";d:0;s:70:"Pecee\Pixie\QueryBuilderTest::testIsPossibleToUseSubqueryInWhereClause";d:0;s:73:"Pecee\Pixie\QueryBuilderTest::testIsPossibleToUseSubqueryInWhereNotClause";d:0;s:52:"Pecee\Pixie\QueryBuilderTest::testOrderByFlexibility";d:0;s:61:"Pecee\Pixie\QueryBuilderTest::testRawStatementsWithinCriteria";d:0;s:61:"Pecee\Pixie\QueryBuilderTest::testRawStatementWithinStatement";d:0;s:58:"Pecee\Pixie\QueryBuilderTest::testRawStatementWithinSelect";d:0.001;s:46:"Pecee\Pixie\QueryBuilderTest::testReplaceQuery";d:0;s:47:"Pecee\Pixie\QueryBuilderTest::testSelectAliases";d:0;s:48:"Pecee\Pixie\QueryBuilderTest::testSelectDistinct";d:0;s:62:"Pecee\Pixie\QueryBuilderTest::testSelectDistinctAndSelectCalls";d:0;s:64:"Pecee\Pixie\QueryBuilderTest::testSelectDistinctWithSingleColumn";d:0;s:51:"Pecee\Pixie\QueryBuilderTest::testSelectFlexibility";d:0;s:45:"Pecee\Pixie\QueryBuilderTest::testSelectQuery";d:0.001;s:71:"Pecee\Pixie\QueryBuilderTest::testSelectQueryWithNestedCriteriaAndJoins";d:0.001;s:53:"Pecee\Pixie\QueryBuilderTest::testSelectQueryWithNull";d:0;s:55:"Pecee\Pixie\QueryBuilderTest::testSelectWithQueryEvents";d:0.001;s:52:"Pecee\Pixie\QueryBuilderTest::testStandaloneWhereNot";d:0;s:45:"Pecee\Pixie\QueryBuilderTest::testUpdateQuery";d:0;s:53:"Pecee\Pixie\QueryBuilderTest::testDeleteAdvancedQuery";d:0.001;s:53:"Pecee\Pixie\QueryBuilderTest::testUpdateAdvancedQuery";d:0.001;s:46:"Pecee\Pixie\QueryBuilderTest::testFromSubQuery";d:0;s:44:"Pecee\Pixie\QueryBuilderTest::testTableAlias";d:0;s:54:"Pecee\Pixie\QueryBuilderTest::testWhereNotNullSubQuery";d:0.001;s:43:"Pecee\Pixie\QueryBuilderTest::testJoinUsing";d:0.001;s:55:"Pecee\Pixie\QueryBuilderTest::testJoinQueryBuilderUsing";d:0.001;s:42:"Pecee\Pixie\ConnectionTest::testConnection";d:0.048;s:47:"Pecee\Pixie\ConnectionTest::testMultiConnection";d:0.001;s:57:"Pecee\Pixie\CustomExceptionsTest::testConnectionException";d:0.007;s:60:"Pecee\Pixie\CustomExceptionsTest::testTableNotFoundException";d:0.059;s:61:"Pecee\Pixie\CustomExceptionsTest::testColumnNotFoundException";d:0.053;s:61:"Pecee\Pixie\CustomExceptionsTest::testDuplicateEntryException";d:0.059;s:75:"Pecee\Pixie\CustomExceptionsTest::testQueryAggregateColumnNotFoundException";d:0.045;s:57:"Pecee\Pixie\CustomExceptionsTest::testForeignKeyException";d:0.044;s:54:"Pecee\Pixie\CustomExceptionsTest::testNotNullException";d:0.046;s:45:"Pecee\Pixie\NoTableSubQueryTest::testRawQuery";d:0.001;s:53:"Pecee\Pixie\QueryBuilderAggregateTest::testQueryCount";d:0.048;s:59:"Pecee\Pixie\QueryBuilderAggregateTest::testSqliteQueryCount";d:0.002;s:51:"Pecee\Pixie\QueryBuilderAggregateTest::testQuerySum";d:0.039;s:57:"Pecee\Pixie\QueryBuilderAggregateTest::testSqliteQuerySum";d:0.002;s:55:"Pecee\Pixie\QueryBuilderAggregateTest::testQueryAverage";d:0.037;s:61:"Pecee\Pixie\QueryBuilderAggregateTest::testSqliteQueryAverage";d:0.001;s:44:"Pecee\Pixie\QueryBuilder::testFalseBoolWhere";d:0;s:59:"Pecee\Pixie\QueryBuilder::testInsertQueryReturnsIdForInsert";d:0.002;s:65:"Pecee\Pixie\QueryBuilder::testInsertQueryReturnsIdForInsertIgnore";d:0.001;s:68:"Pecee\Pixie\QueryBuilder::testInsertQueryReturnsNullForIgnoredInsert";d:0.001;s:38:"Pecee\Pixie\QueryBuilder::testRawQuery";d:0.001;s:43:"Pecee\Pixie\QueryBuilder::testNullableWhere";d:0.001;s:42:"Pecee\Pixie\QueryBuilder::testWhereBetween";d:0.001;s:35:"Pecee\Pixie\QueryBuilder::testUnion";d:0.001;s:43:"Pecee\Pixie\QueryBuilder::testUnionSubQuery";d:0.001;s:44:"Pecee\Pixie\QueryBuilder::testQueryOverwrite";d:0.001;s:40:"Pecee\Pixie\QueryBuilder::testGetColumns";d:0.001;s:42:"Pecee\Pixie\QueryBuilder::testQueryPartFor";d:0;s:41:"Pecee\Pixie\QueryBuilder::testRemoveQuery";d:0.001;s:50:"Pecee\Pixie\TransactionTest::testTransactionResult";d:0.043;s:51:"Pecee\Pixie\TransactionTest::testNestedTransactions";d:0.05;s:58:"Pecee\Pixie\TransactionTest::testTransactionMultipleInsert";d:0.043;s:42:"Pecee\Pixie\TransactionTest::testLastQuery";d:0.038;s:47:"Pecee\Pixie\QueryBuilderTest::testRawExpression";d:0;}}}
C:37:"PHPUnit\Runner\DefaultTestResultCache":4437:{a:2:{s:7:"defects";a:0:{}s:5:"times";a:66:{s:42:"Pecee\Pixie\ConnectionTest::testConnection";d:0.059;s:47:"Pecee\Pixie\ConnectionTest::testMultiConnection";d:0.001;s:57:"Pecee\Pixie\CustomExceptionsTest::testConnectionException";d:0.121;s:60:"Pecee\Pixie\CustomExceptionsTest::testTableNotFoundException";d:0.467;s:61:"Pecee\Pixie\CustomExceptionsTest::testColumnNotFoundException";d:0.053;s:61:"Pecee\Pixie\CustomExceptionsTest::testDuplicateEntryException";d:0.052;s:75:"Pecee\Pixie\CustomExceptionsTest::testQueryAggregateColumnNotFoundException";d:0.048;s:57:"Pecee\Pixie\CustomExceptionsTest::testForeignKeyException";d:0.044;s:54:"Pecee\Pixie\CustomExceptionsTest::testNotNullException";d:0.041;s:45:"Pecee\Pixie\NoTableSubQueryTest::testRawQuery";d:0.001;s:53:"Pecee\Pixie\QueryBuilderAggregateTest::testQueryCount";d:0.039;s:59:"Pecee\Pixie\QueryBuilderAggregateTest::testSqliteQueryCount";d:0.001;s:51:"Pecee\Pixie\QueryBuilderAggregateTest::testQuerySum";d:0.041;s:57:"Pecee\Pixie\QueryBuilderAggregateTest::testSqliteQuerySum";d:0.001;s:55:"Pecee\Pixie\QueryBuilderAggregateTest::testQueryAverage";d:0.039;s:61:"Pecee\Pixie\QueryBuilderAggregateTest::testSqliteQueryAverage";d:0.002;s:39:"Pecee\Pixie\QueryBuilderTest::testAlias";d:0.001;s:45:"Pecee\Pixie\QueryBuilderTest::testDeleteQuery";d:0.001;s:50:"Pecee\Pixie\QueryBuilderTest::testEventPropagation";d:0.001;s:51:"Pecee\Pixie\QueryBuilderTest::testInsertIgnoreQuery";d:0;s:65:"Pecee\Pixie\QueryBuilderTest::testInsertOnDuplicateKeyUpdateQuery";d:0;s:45:"Pecee\Pixie\QueryBuilderTest::testInsertQuery";d:0;s:70:"Pecee\Pixie\QueryBuilderTest::testIsPossibleToUseSubqueryInWhereClause";d:0;s:73:"Pecee\Pixie\QueryBuilderTest::testIsPossibleToUseSubqueryInWhereNotClause";d:0;s:52:"Pecee\Pixie\QueryBuilderTest::testOrderByFlexibility";d:0;s:61:"Pecee\Pixie\QueryBuilderTest::testRawStatementsWithinCriteria";d:0.001;s:61:"Pecee\Pixie\QueryBuilderTest::testRawStatementWithinStatement";d:0;s:58:"Pecee\Pixie\QueryBuilderTest::testRawStatementWithinSelect";d:0.001;s:56:"Pecee\Pixie\QueryBuilderTest::testRawStatementWithinJoin";d:0.001;s:47:"Pecee\Pixie\QueryBuilderTest::testRawExpression";d:0.001;s:46:"Pecee\Pixie\QueryBuilderTest::testReplaceQuery";d:0.001;s:47:"Pecee\Pixie\QueryBuilderTest::testSelectAliases";d:0.001;s:48:"Pecee\Pixie\QueryBuilderTest::testSelectDistinct";d:0;s:62:"Pecee\Pixie\QueryBuilderTest::testSelectDistinctAndSelectCalls";d:0;s:64:"Pecee\Pixie\QueryBuilderTest::testSelectDistinctWithSingleColumn";d:0;s:51:"Pecee\Pixie\QueryBuilderTest::testSelectFlexibility";d:0;s:45:"Pecee\Pixie\QueryBuilderTest::testSelectQuery";d:0.001;s:71:"Pecee\Pixie\QueryBuilderTest::testSelectQueryWithNestedCriteriaAndJoins";d:0.001;s:53:"Pecee\Pixie\QueryBuilderTest::testSelectQueryWithNull";d:0;s:55:"Pecee\Pixie\QueryBuilderTest::testSelectWithQueryEvents";d:0;s:52:"Pecee\Pixie\QueryBuilderTest::testStandaloneWhereNot";d:0;s:45:"Pecee\Pixie\QueryBuilderTest::testUpdateQuery";d:0;s:53:"Pecee\Pixie\QueryBuilderTest::testDeleteAdvancedQuery";d:0;s:53:"Pecee\Pixie\QueryBuilderTest::testUpdateAdvancedQuery";d:0;s:46:"Pecee\Pixie\QueryBuilderTest::testFromSubQuery";d:0;s:44:"Pecee\Pixie\QueryBuilderTest::testTableAlias";d:0;s:54:"Pecee\Pixie\QueryBuilderTest::testWhereNotNullSubQuery";d:0;s:43:"Pecee\Pixie\QueryBuilderTest::testJoinUsing";d:0;s:55:"Pecee\Pixie\QueryBuilderTest::testJoinQueryBuilderUsing";d:0;s:44:"Pecee\Pixie\QueryBuilder::testFalseBoolWhere";d:0;s:59:"Pecee\Pixie\QueryBuilder::testInsertQueryReturnsIdForInsert";d:0.001;s:65:"Pecee\Pixie\QueryBuilder::testInsertQueryReturnsIdForInsertIgnore";d:0;s:68:"Pecee\Pixie\QueryBuilder::testInsertQueryReturnsNullForIgnoredInsert";d:0;s:38:"Pecee\Pixie\QueryBuilder::testRawQuery";d:0;s:43:"Pecee\Pixie\QueryBuilder::testNullableWhere";d:0;s:42:"Pecee\Pixie\QueryBuilder::testWhereBetween";d:0;s:35:"Pecee\Pixie\QueryBuilder::testUnion";d:0;s:43:"Pecee\Pixie\QueryBuilder::testUnionSubQuery";d:0;s:44:"Pecee\Pixie\QueryBuilder::testQueryOverwrite";d:0.001;s:40:"Pecee\Pixie\QueryBuilder::testGetColumns";d:0.001;s:42:"Pecee\Pixie\QueryBuilder::testQueryPartFor";d:0;s:41:"Pecee\Pixie\QueryBuilder::testRemoveQuery";d:0.001;s:50:"Pecee\Pixie\TransactionTest::testTransactionResult";d:0.044;s:51:"Pecee\Pixie\TransactionTest::testNestedTransactions";d:0.049;s:58:"Pecee\Pixie\TransactionTest::testTransactionMultipleInsert";d:0.039;s:42:"Pecee\Pixie\TransactionTest::testLastQuery";d:0.041;}}}
57 changes: 35 additions & 22 deletions src/Pecee/Pixie/QueryBuilder/Adapters/BaseAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ protected function buildCriteria(array $statements, bool $bindValues = true): ar

$value = $statement['value'];

if ($value instanceof Raw) {
$bindings[] = $value->getBindings();
}

if ($value === null && $key instanceof \Closure) {

/**
Expand Down Expand Up @@ -290,11 +294,12 @@ protected function buildCriteriaWithType(array $statements, $key, $type, $bindVa
* Build join string
*
* @param array $statements
* @param array $bindings
*
* @return string
* @throws Exception
*/
protected function buildJoin(array $statements): string
protected function buildJoin(array $statements, array &$bindings): string
{
$sql = '';

Expand All @@ -313,12 +318,20 @@ protected function buildJoin(array $statements): string
/* @var $joinBuilder QueryBuilderHandler */
$joinBuilder = $joinArr['joinBuilder'];

$valueSql = '';

if ($joinBuilder instanceof QueryBuilderHandler) {
$valueQuery = $joinBuilder->getQuery('criteriaOnly', false);
$valueSql = $valueQuery->getSql();
$bindings += $valueQuery->getBindings();
}

$sqlArr = [
$sql,
strtoupper($joinArr['type']),
'JOIN',
$table,
$joinBuilder instanceof QueryBuilderHandler ? $joinBuilder->getQuery('criteriaOnly', false)->getSql() : '',
$valueSql,
];

$sql = $this->concatenateQuery($sqlArr);
Expand Down Expand Up @@ -387,21 +400,20 @@ public function delete(array $statements, array $columns = null): array
}

// WHERE
[$whereCriteria, $whereBindings] = $this->buildCriteriaWithType($statements, 'wheres', 'WHERE');
[$whereCriteria, $bindings] = $this->buildCriteriaWithType($statements, 'wheres', 'WHERE');

$sql = $this->concatenateQuery([
'DELETE ',
$columnsQuery,
' FROM',
$this->wrapSanitizer($table),
$this->buildQueryPart(static::QUERY_PART_JOIN, $statements),
$this->buildQueryPart(static::QUERY_PART_JOIN, $statements, $bindings),
$whereCriteria,
$this->buildQueryPart(static::QUERY_PART_GROUPBY, $statements),
$this->buildQueryPart(static::QUERY_PART_ORDERBY, $statements),
$this->buildQueryPart(static::QUERY_PART_LIMIT, $statements),
$this->buildQueryPart(static::QUERY_PART_OFFSET, $statements),
$this->buildQueryPart(static::QUERY_PART_GROUPBY, $statements, $bindings),
$this->buildQueryPart(static::QUERY_PART_ORDERBY, $statements, $bindings),
$this->buildQueryPart(static::QUERY_PART_LIMIT, $statements, $bindings),
$this->buildQueryPart(static::QUERY_PART_OFFSET, $statements, $bindings),
]);
$bindings = $whereBindings;

return compact('sql', 'bindings');
}
Expand Down Expand Up @@ -610,14 +622,14 @@ public function select(array $statements): array
$this->arrayStr($statements['selects'], ', '),
$fromEnabled ? 'FROM' : '',
$tables,
$this->buildQueryPart(static::QUERY_PART_JOIN, $statements),
$this->buildQueryPart(static::QUERY_PART_JOIN, $statements, $bindings),
$whereCriteria,
$this->buildQueryPart(static::QUERY_PART_GROUPBY, $statements),
$this->buildQueryPart(static::QUERY_PART_GROUPBY, $statements, $bindings),
$havingCriteria,
$this->buildQueryPart(static::QUERY_PART_ORDERBY, $statements),
$this->buildQueryPart(static::QUERY_PART_LIMIT, $statements),
$this->buildQueryPart(static::QUERY_PART_OFFSET, $statements),
$this->buildQueryPart(static::QUERY_PART_FOR, $statements),
$this->buildQueryPart(static::QUERY_PART_ORDERBY, $statements, $bindings),
$this->buildQueryPart(static::QUERY_PART_LIMIT, $statements, $bindings),
$this->buildQueryPart(static::QUERY_PART_OFFSET, $statements, $bindings),
$this->buildQueryPart(static::QUERY_PART_FOR, $statements, $bindings),
]);

$sql = $this->buildUnion($statements, $sql);
Expand All @@ -636,14 +648,15 @@ public function select(array $statements): array
*
* @param string $section
* @param array $statements
* @param array $bindings
* @return string
* @throws Exception
*/
protected function buildQueryPart(string $section, array $statements): string
protected function buildQueryPart(string $section, array $statements, array &$bindings): string
{
switch ($section) {
case static::QUERY_PART_JOIN:
return $this->buildJoin($statements);
return $this->buildJoin($statements, $bindings);
case static::QUERY_PART_TOP:
return isset($statements['limit']) ? 'TOP ' . $statements['limit'] : '';
case static::QUERY_PART_LIMIT:
Expand Down Expand Up @@ -733,13 +746,13 @@ public function update(array $statements, array $data): array
$sqlArray = [
'UPDATE',
$this->buildAliasedTableName($table, $statements),
$this->buildQueryPart(static::QUERY_PART_JOIN, $statements),
$this->buildQueryPart(static::QUERY_PART_JOIN, $statements, $bindings),
'SET ' . $updateStatement,
$whereCriteria,
$this->buildQueryPart(static::QUERY_PART_GROUPBY, $statements),
$this->buildQueryPart(static::QUERY_PART_ORDERBY, $statements),
$this->buildQueryPart(static::QUERY_PART_LIMIT, $statements),
$this->buildQueryPart(static::QUERY_PART_OFFSET, $statements),
$this->buildQueryPart(static::QUERY_PART_GROUPBY, $statements, $bindings),
$this->buildQueryPart(static::QUERY_PART_ORDERBY, $statements, $bindings),
$this->buildQueryPart(static::QUERY_PART_LIMIT, $statements, $bindings),
$this->buildQueryPart(static::QUERY_PART_OFFSET, $statements, $bindings),
];

$sql = $this->concatenateQuery($sqlArray);
Expand Down
Loading

0 comments on commit aa79d50

Please sign in to comment.