Skip to content

Commit 6f6a18d

Browse files
authored
Remove ExpressionBuilder (#352)
1 parent 0688263 commit 6f6a18d

File tree

4 files changed

+6
-30
lines changed

4 files changed

+6
-30
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## 2.0.0 under development
44

5-
- Enh #289: Implement `SqlParser` and `ExpressionBuilder` driver classes (@Tigrov)
5+
- Enh #289, #352: Implement and use `SqlParser` class (@Tigrov)
66
- New #273: Implement `ColumnSchemaInterface` classes according to the data type of database table columns
77
for type casting performance. Related with yiisoft/db#752 (@Tigrov)
88
- Chg #307: Replace call of `SchemaInterface::getRawTableName()` to `QuoterInterface::getRawTableName()` (@Tigrov)

src/Builder/ExpressionBuilder.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/DQLQueryBuilder.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@
44

55
namespace Yiisoft\Db\Sqlite;
66

7-
use Yiisoft\Db\Expression\Expression;
8-
use Yiisoft\Db\Expression\ExpressionBuilderInterface;
97
use Yiisoft\Db\Expression\ExpressionInterface;
108
use Yiisoft\Db\Query\Query;
119
use Yiisoft\Db\Query\QueryInterface;
1210
use Yiisoft\Db\QueryBuilder\AbstractDQLQueryBuilder;
1311
use Yiisoft\Db\QueryBuilder\Condition\InCondition;
1412
use Yiisoft\Db\QueryBuilder\Condition\JsonOverlapsCondition;
1513
use Yiisoft\Db\QueryBuilder\Condition\LikeCondition;
16-
use Yiisoft\Db\Sqlite\Builder\ExpressionBuilder;
1714
use Yiisoft\Db\Sqlite\Builder\InConditionBuilder;
1815
use Yiisoft\Db\Sqlite\Builder\JsonOverlapsConditionBuilder;
1916
use Yiisoft\Db\Sqlite\Builder\LikeConditionBuilder;
@@ -123,23 +120,13 @@ public function buildUnion(array $unions, array &$params = []): string
123120
return trim($result);
124121
}
125122

126-
/**
127-
* Has an array of default expression builders.
128-
*
129-
* Extend this method and override it if you want to change default expression builders for this query builder.
130-
*
131-
* {@see ExpressionBuilder} docs for details.
132-
*
133-
* @psalm-return array<string, class-string<ExpressionBuilderInterface>>
134-
*/
135123
protected function defaultExpressionBuilders(): array
136124
{
137125
return [
138126
...parent::defaultExpressionBuilders(),
139127
JsonOverlapsCondition::class => JsonOverlapsConditionBuilder::class,
140128
LikeCondition::class => LikeConditionBuilder::class,
141129
InCondition::class => InConditionBuilder::class,
142-
Expression::class => ExpressionBuilder::class,
143130
];
144131
}
145132
}

src/QueryBuilder.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,9 @@ protected function prepareBinary(string $binary): string
3333
{
3434
return "x'" . bin2hex($binary) . "'";
3535
}
36+
37+
protected function createSqlParser(string $sql): SqlParser
38+
{
39+
return new SqlParser($sql);
40+
}
3641
}

0 commit comments

Comments
 (0)