Lines 100.00% 1 / 1
Functions and Methods 100.00% 1 / 1
Classes and Traits 100.00% 1 / 1
Name Lines Functions and Methods CRAP Classes and Traits
MariaDbConnection 100.00% 1 / 1 100.00% 1 / 1 1 100.00% 1 / 1
 getDefaultSchemaInspector 100.00% 1 / 1 100.00% 1 / 1 1
1<?php
2
3declare(strict_types=1);
4
5namespace BlueprintAU\Radiant\Database\Connections;
6
7use BlueprintAU\Radiant\Database\Schema\Inspectors\MariaDbSchemaInspector;
8use BlueprintAU\Radiant\Database\Schema\Inspectors\SchemaInspector;
9use Override;
10
11/**
12 * A database connection backed by MariaDB.
13 *
14 * MariaDB speaks the MySQL wire protocol and SQL surface, so the
15 * grammar, savepoint and `GET_LOCK` behavior are inherited unchanged —
16 * only the live-schema reader is swapped, for the JSON-as-longtext and
17 * current-timestamp spellings MariaDB diverges on.
18 *
19 * @see \BlueprintAU\Radiant\Database\Connections\MySqlConnection
20 */
21final class MariaDbConnection extends MySqlConnection
22{
23    /**
24     * The dialect's live-schema reader.
25     *
26     * @return MariaDbSchemaInspector
27     */
28    #[Override]
29    protected function getDefaultSchemaInspector(): SchemaInspector
30    {
31        return new MariaDbSchemaInspector($this->pdo);
32    }
33}