2016-09-21 13:42:40 +05:30
|
|
|
<?php
|
2019-09-18 04:44:05 +05:30
|
|
|
declare(strict_types=1);
|
|
|
|
|
2016-09-21 13:42:40 +05:30
|
|
|
namespace common\db\mysql;
|
|
|
|
|
2019-09-18 04:44:05 +05:30
|
|
|
use SamIT\Yii2\MariaDb\JsonExpressionBuilder;
|
2020-06-10 20:08:05 +05:30
|
|
|
use SamIT\Yii2\MariaDb\Schema as MariaDbSchema;
|
|
|
|
use yii\db\JsonExpression;
|
2016-09-21 13:42:40 +05:30
|
|
|
|
2020-06-10 20:08:05 +05:30
|
|
|
class Schema extends MariaDbSchema {
|
2016-09-21 13:42:40 +05:30
|
|
|
|
2020-06-10 20:08:05 +05:30
|
|
|
public function createQueryBuilder(): QueryBuilder {
|
2019-09-18 04:44:05 +05:30
|
|
|
$result = new QueryBuilder($this->db);
|
|
|
|
$result->setExpressionBuilders([
|
2020-06-10 20:08:05 +05:30
|
|
|
JsonExpression::class => JsonExpressionBuilder::class,
|
2019-09-18 04:44:05 +05:30
|
|
|
]);
|
|
|
|
|
|
|
|
return $result;
|
2016-09-21 13:42:40 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
}
|