accounts/common/db/mysql/Schema.php
2020-06-10 17:38:05 +03:00

22 lines
478 B
PHP

<?php
declare(strict_types=1);
namespace common\db\mysql;
use SamIT\Yii2\MariaDb\JsonExpressionBuilder;
use SamIT\Yii2\MariaDb\Schema as MariaDbSchema;
use yii\db\JsonExpression;
class Schema extends MariaDbSchema {
public function createQueryBuilder(): QueryBuilder {
$result = new QueryBuilder($this->db);
$result->setExpressionBuilders([
JsonExpression::class => JsonExpressionBuilder::class,
]);
return $result;
}
}