accounts/common/db/mysql/Schema.php

22 lines
478 B
PHP
Raw Permalink Normal View History

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