diff --git a/src/Cache/QueryCacheProfile.php b/src/Cache/QueryCacheProfile.php index b1270846512..3a57358faad 100644 --- a/src/Cache/QueryCacheProfile.php +++ b/src/Cache/QueryCacheProfile.php @@ -3,6 +3,7 @@ namespace Doctrine\DBAL\Cache; use Doctrine\Common\Cache\Cache; +use Doctrine\DBAL\Types\Type; use function hash; use function serialize; @@ -68,10 +69,10 @@ public function getCacheKey() /** * Generates the real cache key from query, params, types and connection parameters. * - * @param string $sql - * @param mixed[] $params - * @param int[]|string[] $types - * @param mixed[] $connectionParams + * @param string $sql + * @param array|array $params + * @param array|array $types + * @param array $connectionParams * * @return string[] */ diff --git a/src/Connection.php b/src/Connection.php index b9452ddf0db..6ba714db1ae 100644 --- a/src/Connection.php +++ b/src/Connection.php @@ -469,9 +469,9 @@ public function setAutoCommit($autoCommit) * Prepares and executes an SQL query and returns the first row of the result * as an associative array. * - * @param string $query The SQL query. - * @param array|array $params The prepared statement params. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return array|false False is returned if no rows are found. * @@ -490,9 +490,9 @@ public function fetchAssociative(string $query, array $params = [], array $types * Prepares and executes an SQL query and returns the first row of the result * as a numerically indexed array. * - * @param string $query The SQL query to be executed. - * @param array|array $params The prepared statement params. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return array|false False is returned if no rows are found. * @@ -511,9 +511,9 @@ public function fetchNumeric(string $query, array $params = [], array $types = [ * Prepares and executes an SQL query and returns the value of a single column * of the first row of the result. * - * @param string $query The SQL query to be executed. - * @param array|array $params The prepared statement params. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return mixed|false False is returned if no rows are found. * @@ -549,24 +549,24 @@ public function isTransactionActive() } /** - * Adds identifier condition to the query components + * Adds condition based on the criteria to the query components * - * @param mixed[] $identifier Map of key columns to their values + * @param mixed[] $criteria Map of key columns to their values * @param string[] $columns Column names * @param mixed[] $values Column values * @param string[] $conditions Key conditions * * @throws Exception */ - private function addIdentifierCondition( - array $identifier, + private function addCriteriaCondition( + array $criteria, array &$columns, array &$values, array &$conditions ): void { $platform = $this->getDatabasePlatform(); - foreach ($identifier as $columnName => $value) { + foreach ($criteria as $columnName => $value) { if ($value === null) { $conditions[] = $platform->getIsNullExpression($columnName); continue; @@ -583,23 +583,23 @@ private function addIdentifierCondition( * * Table expression and columns are not escaped and are not safe for user-input. * - * @param string $table The expression of the table on which to delete. - * @param mixed[] $identifier The deletion criteria. An associative array containing column-value pairs. - * @param int[]|string[] $types The types of identifiers. + * @param string $table Table name + * @param array $criteria Deletion criteria + * @param array|array $types Parameter types * * @return int The number of affected rows. * * @throws Exception */ - public function delete($table, array $identifier, array $types = []) + public function delete($table, array $criteria, array $types = []) { - if (count($identifier) === 0) { + if (count($criteria) === 0) { throw InvalidArgumentException::fromEmptyCriteria(); } $columns = $values = $conditions = []; - $this->addIdentifierCondition($identifier, $columns, $values, $conditions); + $this->addCriteriaCondition($criteria, $columns, $values, $conditions); return $this->executeStatement( 'DELETE FROM ' . $table . ' WHERE ' . implode(' AND ', $conditions), @@ -655,16 +655,16 @@ public function getTransactionIsolation() * * Table expression and columns are not escaped and are not safe for user-input. * - * @param string $table The expression of the table to update quoted or unquoted. - * @param mixed[] $data An associative array containing column-value pairs. - * @param mixed[] $identifier The update criteria. An associative array containing column-value pairs. - * @param int[]|string[] $types Types of the merged $data and $identifier arrays in that order. + * @param string $table Table name + * @param array $data Column-value pairs + * @param array $criteria Update criteria + * @param array|array $types Parameter types * * @return int The number of affected rows. * * @throws Exception */ - public function update($table, array $data, array $identifier, array $types = []) + public function update($table, array $data, array $criteria, array $types = []) { $columns = $values = $conditions = $set = []; @@ -674,7 +674,7 @@ public function update($table, array $data, array $identifier, array $types = [] $set[] = $columnName . ' = ?'; } - $this->addIdentifierCondition($identifier, $columns, $values, $conditions); + $this->addCriteriaCondition($criteria, $columns, $values, $conditions); if (is_string(key($types))) { $types = $this->extractTypeValues($columns, $types); @@ -691,9 +691,9 @@ public function update($table, array $data, array $identifier, array $types = [] * * Table expression and columns are not escaped and are not safe for user-input. * - * @param string $table The expression of the table to insert data into, quoted or unquoted. - * @param mixed[] $data An associative array containing column-value pairs. - * @param int[]|string[] $types Types of the inserted data. + * @param string $table Table name + * @param array $data Column-value pairs + * @param array|array $types Parameter types * * @return int The number of affected rows. * @@ -726,10 +726,10 @@ public function insert($table, array $data, array $types = []) /** * Extract ordered type list from an ordered column list and type map. * - * @param int[]|string[] $columnList - * @param int[]|string[] $types + * @param array $columnList + * @param array|array $types * - * @return int[]|string[] + * @return array|array */ private function extractTypeValues(array $columnList, array $types) { @@ -779,9 +779,9 @@ public function quote($value, $type = ParameterType::STRING) /** * Prepares and executes an SQL query and returns the result as an array of numeric arrays. * - * @param string $query The SQL query. - * @param array|array $params The query parameters. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return array> * @@ -799,9 +799,9 @@ public function fetchAllNumeric(string $query, array $params = [], array $types /** * Prepares and executes an SQL query and returns the result as an array of associative arrays. * - * @param string $query The SQL query. - * @param array|array $params The query parameters. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return array> * @@ -820,9 +820,9 @@ public function fetchAllAssociative(string $query, array $params = [], array $ty * Prepares and executes an SQL query and returns the result as an associative array with the keys * mapped to the first column and the values mapped to the second column. * - * @param string $query The SQL query. - * @param array|array $params The query parameters. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return array * @@ -836,9 +836,9 @@ public function fetchAllKeyValue(string $query, array $params = [], array $types /** * Prepares and executes an SQL query and returns the result as an array of the first column values. * - * @param string $query The SQL query. - * @param array|array $params The query parameters. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return array * @@ -856,9 +856,9 @@ public function fetchFirstColumn(string $query, array $params = [], array $types /** * Prepares and executes an SQL query and returns the result as an iterator over rows represented as numeric arrays. * - * @param string $query The SQL query. - * @param array|array $params The query parameters. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return Traversable> * @@ -881,9 +881,9 @@ public function iterateNumeric(string $query, array $params = [], array $types = * Prepares and executes an SQL query and returns the result as an iterator over rows represented * as associative arrays. * - * @param string $query The SQL query. - * @param array|array $params The query parameters. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return Traversable> * @@ -906,9 +906,9 @@ public function iterateAssociative(string $query, array $params = [], array $typ * Prepares and executes an SQL query and returns the result as an iterator with the keys * mapped to the first column and the values mapped to the second column. * - * @param string $query The SQL query. - * @param array|array $params The query parameters. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return Traversable * @@ -922,9 +922,9 @@ public function iterateKeyValue(string $query, array $params = [], array $types /** * Prepares and executes an SQL query and returns the result as an iterator over the first column values. * - * @param string $query The SQL query. - * @param array|array $params The query parameters. - * @param array|array $types The query parameter types. + * @param string $query SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @return Traversable * @@ -961,10 +961,9 @@ public function prepare(string $sql): Statement * If the query is parametrized, a prepared statement is used. * If an SQLLogger is configured, the execution is logged. * - * @param string $sql The SQL query to execute. - * @param mixed[] $params The parameters to bind to the query, if any. - * @param int[]|string[] $types The types the previous parameters are in. - * @param QueryCacheProfile|null $qcp The query cache profile, optional. + * @param string $sql SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @throws Exception */ @@ -1013,10 +1012,9 @@ public function executeQuery( /** * Executes a caching query. * - * @param string $sql The SQL query to execute. - * @param mixed[] $params The parameters to bind to the query, if any. - * @param int[]|string[] $types The types the previous parameters are in. - * @param QueryCacheProfile $qcp The query cache profile. + * @param string $sql SQL query + * @param array|array $params Query parameters + * @param array|array $types Parameter types * * @throws CacheException * @throws Exception @@ -1071,9 +1069,9 @@ public function executeCacheQuery($sql, $params, $types, QueryCacheProfile $qcp) * * This method supports PDO binding types as well as DBAL mapping types. * - * @param string $sql The statement SQL - * @param array $params The query parameters - * @param array $types The parameter types + * @param string $sql SQL statement + * @param array|array $params Statement parameters + * @param array|array $types Parameter types * * @return int The number of affected rows. * @@ -1543,9 +1541,9 @@ public function convertToPHPValue($value, $type) * Binds a set of parameters, some or all of which are typed with a PDO binding type * or DBAL mapping type, to a given statement. * - * @param DriverStatement $stmt The statement to bind the values to. - * @param mixed[] $params The map/list of named/positional parameters. - * @param int[]|string[] $types The parameter types (PDO binding types or DBAL mapping types). + * @param DriverStatement $stmt Prepared statement + * @param array|array $params Statement parameters + * @param array|array $types Parameter types * * @throws Exception */ @@ -1611,10 +1609,10 @@ private function getBindingInfo($value, $type) /** * Resolves the parameters to a format which can be displayed. * - * @param mixed[] $params - * @param array $types + * @param array|array $params Query parameters + * @param array|array $types Parameter types * - * @return mixed[] + * @return array|array */ private function resolveParams(array $params, array $types): array { @@ -1666,8 +1664,8 @@ public function createQueryBuilder() /** * @internal * - * @param array $params - * @param array $types + * @param array|array $params + * @param array|array $types */ final public function convertExceptionDuringQuery( DriverException $e, diff --git a/src/Logging/SQLLogger.php b/src/Logging/SQLLogger.php index 3cb885affa5..8328a71ba5a 100644 --- a/src/Logging/SQLLogger.php +++ b/src/Logging/SQLLogger.php @@ -2,6 +2,8 @@ namespace Doctrine\DBAL\Logging; +use Doctrine\DBAL\Types\Type; + /** * Interface for SQL loggers. */ @@ -10,9 +12,9 @@ interface SQLLogger /** * Logs a SQL statement somewhere. * - * @param string $sql The SQL to be executed. - * @param mixed[]|null $params The SQL parameters. - * @param array $types The SQL parameter types. + * @param string $sql SQL statement + * @param array|array|null $params Statement parameters + * @param array|array|null $types Parameter types * * @return void */ diff --git a/src/Query/QueryBuilder.php b/src/Query/QueryBuilder.php index e11e052b784..39f934a27f2 100644 --- a/src/Query/QueryBuilder.php +++ b/src/Query/QueryBuilder.php @@ -9,6 +9,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder; use Doctrine\DBAL\Result; use Doctrine\DBAL\Statement; +use Doctrine\DBAL\Types\Type; use function array_key_exists; use function array_keys; @@ -89,14 +90,14 @@ class QueryBuilder /** * The query parameters. * - * @var mixed[] + * @var array|array */ private $params = []; /** * The parameter type map of this query. * - * @var int[]|string[] + * @var array|array */ private $paramTypes = []; @@ -266,9 +267,9 @@ public function getSQL() * ->setParameter(':user_id', 1); * * - * @param string|int $key The parameter position or name. - * @param mixed $value The parameter value. - * @param string|int|null $type One of the {@link ParameterType} constants. + * @param int|string $key Parameter position or name + * @param mixed $value Parameter value + * @param int|string|Type|null $type One of the {@link ParameterType} constants or DBAL type * * @return $this This QueryBuilder instance. */ @@ -297,8 +298,8 @@ public function setParameter($key, $value, $type = null) * )); * * - * @param mixed[] $params The query parameters to set. - * @param int[]|string[] $types The query parameters types to set. + * @param array|array $params Parameters to set + * @param array|array $types Parameter types * * @return $this This QueryBuilder instance. */ @@ -313,7 +314,7 @@ public function setParameters(array $params, array $types = []) /** * Gets all defined query parameters for the query being constructed indexed by parameter index or name. * - * @return mixed[] The currently defined query parameters indexed by parameter index or name. + * @return array|array The currently defined query parameters */ public function getParameters() { @@ -335,7 +336,8 @@ public function getParameter($key) /** * Gets all defined query parameter types for the query being constructed indexed by parameter index or name. * - * @return int[]|string[] The currently defined query parameter types indexed by parameter index or name. + * @return array|array The currently defined + * query parameter types */ public function getParameterTypes() { @@ -345,9 +347,9 @@ public function getParameterTypes() /** * Gets a (previously set) query parameter type of the query being constructed. * - * @param mixed $key The key (index or name) of the bound parameter type. + * @param int|string $key The key of the bound parameter type * - * @return mixed The value of the bound parameter type. + * @return int|string|Type|null The value of the bound parameter type */ public function getParameterType($key) { @@ -1286,9 +1288,9 @@ public function __toString() * * @link http://www.zetacomponents.org * - * @param mixed $value - * @param mixed $type - * @param string $placeHolder The name to bind with. The string must start with a colon ':'. + * @param mixed $value + * @param int|string|Type|null $type + * @param string $placeHolder The name to bind with. The string must start with a colon ':'. * * @return string the placeholder name used. */ @@ -1321,8 +1323,8 @@ public function createNamedParameter($value, $type = ParameterType::STRING, $pla * ->orWhere('u.username = ' . $qb->createPositionalParameter('Bar', ParameterType::STRING)) * * - * @param mixed $value - * @param int $type + * @param mixed $value + * @param int|string|Type|null $type * * @return string */ diff --git a/src/SQLParserUtils.php b/src/SQLParserUtils.php index 0dc481229b6..4274a6c38e2 100644 --- a/src/SQLParserUtils.php +++ b/src/SQLParserUtils.php @@ -2,6 +2,8 @@ namespace Doctrine\DBAL; +use Doctrine\DBAL\Types\Type; + use function array_fill; use function array_fill_keys; use function array_key_exists; @@ -106,9 +108,9 @@ private static function collectPlaceholders( /** * For a positional query this method can rewrite the sql statement with regard to array parameters. * - * @param string $query The SQL query to execute. - * @param mixed[] $params The parameters to bind to the query. - * @param array $types The types the previous parameters are in. + * @param string $query SQL query + * @param mixed[] $params Query parameters + * @param array|array $types Parameter types * * @return mixed[] * diff --git a/src/Tools/Console/Command/ReservedWordsCommand.php b/src/Tools/Console/Command/ReservedWordsCommand.php index 4f290a4b433..439648cca9d 100644 --- a/src/Tools/Console/Command/ReservedWordsCommand.php +++ b/src/Tools/Console/Command/ReservedWordsCommand.php @@ -26,6 +26,7 @@ use function assert; use function count; use function implode; +use function is_array; use function is_string; class ReservedWordsCommand extends Command @@ -121,7 +122,14 @@ protected function execute(InputInterface $input, OutputInterface $output) { $conn = $this->getConnection($input); - $keywordLists = (array) $input->getOption('list'); + $keywordLists = $input->getOption('list'); + + if (is_string($keywordLists)) { + $keywordLists = [$keywordLists]; + } elseif (! is_array($keywordLists)) { + $keywordLists = []; + } + if (count($keywordLists) === 0) { $keywordLists = array_keys($this->keywordListClasses); } diff --git a/tests/Functional/Schema/Db2SchemaManagerTest.php b/tests/Functional/Schema/Db2SchemaManagerTest.php index 15ba904efb3..e46c4014d10 100644 --- a/tests/Functional/Schema/Db2SchemaManagerTest.php +++ b/tests/Functional/Schema/Db2SchemaManagerTest.php @@ -2,11 +2,18 @@ namespace Doctrine\DBAL\Tests\Functional\Schema; +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Platforms\DB2Platform; use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Types\BooleanType; class Db2SchemaManagerTest extends SchemaManagerFunctionalTestCase { + protected function supportsPlatform(AbstractPlatform $platform): bool + { + return $platform instanceof DB2Platform; + } + public function testGetBooleanColumn(): void { $table = new Table('boolean_column_test'); diff --git a/tests/Functional/Schema/MySqlSchemaManagerTest.php b/tests/Functional/Schema/MySqlSchemaManagerTest.php index f31fad44636..a34132accbe 100644 --- a/tests/Functional/Schema/MySqlSchemaManagerTest.php +++ b/tests/Functional/Schema/MySqlSchemaManagerTest.php @@ -3,6 +3,7 @@ namespace Doctrine\DBAL\Tests\Functional\Schema; use DateTime; +use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\MariaDb1027Platform; use Doctrine\DBAL\Platforms\MySqlPlatform; use Doctrine\DBAL\Schema\Comparator; @@ -15,6 +16,11 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase { + protected function supportsPlatform(AbstractPlatform $platform): bool + { + return $platform instanceof MySqlPlatform; + } + protected function setUp(): void { parent::setUp(); diff --git a/tests/Functional/Schema/OracleSchemaManagerTest.php b/tests/Functional/Schema/OracleSchemaManagerTest.php index d0c186910e8..3296279ac63 100644 --- a/tests/Functional/Schema/OracleSchemaManagerTest.php +++ b/tests/Functional/Schema/OracleSchemaManagerTest.php @@ -2,6 +2,8 @@ namespace Doctrine\DBAL\Tests\Functional\Schema; +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Platforms\OraclePlatform; use Doctrine\DBAL\Schema; use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Tests\TestUtil; @@ -15,6 +17,11 @@ class OracleSchemaManagerTest extends SchemaManagerFunctionalTestCase /** @var bool */ private static $privilegesGranted = false; + protected function supportsPlatform(AbstractPlatform $platform): bool + { + return $platform instanceof OraclePlatform; + } + protected function setUp(): void { parent::setUp(); diff --git a/tests/Functional/Schema/PostgreSqlSchemaManagerTest.php b/tests/Functional/Schema/PostgreSqlSchemaManagerTest.php index 85e1e24f240..b4ddb05b50d 100644 --- a/tests/Functional/Schema/PostgreSqlSchemaManagerTest.php +++ b/tests/Functional/Schema/PostgreSqlSchemaManagerTest.php @@ -26,6 +26,11 @@ class PostgreSqlSchemaManagerTest extends SchemaManagerFunctionalTestCase /** @var PostgreSqlSchemaManager */ protected $schemaManager; + protected function supportsPlatform(AbstractPlatform $platform): bool + { + return $platform instanceof PostgreSQL94Platform; + } + protected function tearDown(): void { parent::tearDown(); diff --git a/tests/Functional/Schema/SQLServerSchemaManagerTest.php b/tests/Functional/Schema/SQLServerSchemaManagerTest.php index b54e8593b95..19ad0a032ad 100644 --- a/tests/Functional/Schema/SQLServerSchemaManagerTest.php +++ b/tests/Functional/Schema/SQLServerSchemaManagerTest.php @@ -2,6 +2,8 @@ namespace Doctrine\DBAL\Tests\Functional\Schema; +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Platforms\SQLServer2012Platform; use Doctrine\DBAL\Schema\Column; use Doctrine\DBAL\Schema\ColumnDiff; use Doctrine\DBAL\Schema\Table; @@ -12,9 +14,9 @@ class SQLServerSchemaManagerTest extends SchemaManagerFunctionalTestCase { - protected function getPlatformName(): string + protected function supportsPlatform(AbstractPlatform $platform): bool { - return 'mssql'; + return $platform instanceof SQLServer2012Platform; } public function testDropColumnConstraints(): void diff --git a/tests/Functional/Schema/SchemaManagerFunctionalTestCase.php b/tests/Functional/Schema/SchemaManagerFunctionalTestCase.php index 78f394b35cf..a5148c8a368 100644 --- a/tests/Functional/Schema/SchemaManagerFunctionalTestCase.php +++ b/tests/Functional/Schema/SchemaManagerFunctionalTestCase.php @@ -5,6 +5,7 @@ use Doctrine\Common\EventManager; use Doctrine\DBAL\Events; use Doctrine\DBAL\Exception; +use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Schema\AbstractAsset; use Doctrine\DBAL\Schema\AbstractSchemaManager; use Doctrine\DBAL\Schema\Column; @@ -36,11 +37,9 @@ use function array_values; use function count; use function current; -use function end; -use function explode; +use function get_class; use function in_array; use function sprintf; -use function str_replace; use function strcasecmp; use function strlen; use function strtolower; @@ -51,23 +50,16 @@ abstract class SchemaManagerFunctionalTestCase extends FunctionalTestCase /** @var AbstractSchemaManager */ protected $schemaManager; - protected function getPlatformName(): string - { - $class = static::class; - $e = explode('\\', $class); - $testClass = end($e); - - return strtolower(str_replace('SchemaManagerTest', '', $testClass)); - } + abstract protected function supportsPlatform(AbstractPlatform $platform): bool; protected function setUp(): void { parent::setUp(); - $dbms = $this->getPlatformName(); + $platform = $this->connection->getDatabasePlatform(); - if ($this->connection->getDatabasePlatform()->getName() !== $dbms) { - self::markTestSkipped(static::class . ' requires the use of ' . $dbms); + if (! $this->supportsPlatform($platform)) { + self::markTestSkipped(sprintf('Skipping since connected to %s', get_class($platform))); } $this->schemaManager = $this->connection->getSchemaManager(); diff --git a/tests/Functional/Schema/SqliteSchemaManagerTest.php b/tests/Functional/Schema/SqliteSchemaManagerTest.php index ad1db2311d8..fdd0af7969a 100644 --- a/tests/Functional/Schema/SqliteSchemaManagerTest.php +++ b/tests/Functional/Schema/SqliteSchemaManagerTest.php @@ -3,6 +3,8 @@ namespace Doctrine\DBAL\Tests\Functional\Schema; use Doctrine\DBAL\Exception; +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Schema; use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Types\BlobType; @@ -13,6 +15,11 @@ class SqliteSchemaManagerTest extends SchemaManagerFunctionalTestCase { + protected function supportsPlatform(AbstractPlatform $platform): bool + { + return $platform instanceof SqlitePlatform; + } + /** * SQLITE does not support databases. */