diff --git a/src/Persistence/GenericPlatform.php b/src/Persistence/GenericPlatform.php index ff511e7142..21e696efa4 100644 --- a/src/Persistence/GenericPlatform.php +++ b/src/Persistence/GenericPlatform.php @@ -4,62 +4,113 @@ namespace Atk4\Data\Persistence; -use Doctrine\DBAL\Exception as DbalException; -use Doctrine\DBAL\Platforms; +use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Platforms\AbstractPlatform; +use Doctrine\DBAL\Platforms\DateIntervalUnit; +use Doctrine\DBAL\Platforms\Exception\NotSupported; +use Doctrine\DBAL\Platforms\Keywords\KeywordList; +use Doctrine\DBAL\Schema\AbstractSchemaManager; +use Doctrine\DBAL\Schema\TableDiff; +use Doctrine\DBAL\TransactionIsolationLevel; -class GenericPlatform extends Platforms\AbstractPlatform +class GenericPlatform extends AbstractPlatform { - private function createNotSupportedException(): \Exception + protected function initializeDoctrineTypeMappings(): void { - return DbalException::notSupported('SQL'); } - public function getName(): string + protected function _getCommonIntegerTypeDeclarationSQL(array $column): string { - return 'atk4_data_generic'; + throw NotSupported::new(__METHOD__); } - protected function initializeDoctrineTypeMappings(): void + public function getBigIntTypeDeclarationSQL(array $column): string + { + throw NotSupported::new(__METHOD__); + } + + public function getBlobTypeDeclarationSQL(array $column): string { + throw NotSupported::new(__METHOD__); } - protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef): string + public function getBooleanTypeDeclarationSQL(array $column): string { - throw $this->createNotSupportedException(); + throw NotSupported::new(__METHOD__); } - public function getBigIntTypeDeclarationSQL(array $columnDef): string + public function getClobTypeDeclarationSQL(array $column): string { - throw $this->createNotSupportedException(); + throw NotSupported::new(__METHOD__); } - public function getBlobTypeDeclarationSQL(array $field): string + public function getDateTimeTypeDeclarationSQL(array $column): string { - throw $this->createNotSupportedException(); + throw NotSupported::new(__METHOD__); } - public function getBooleanTypeDeclarationSQL(array $columnDef): string + public function getDateTypeDeclarationSQL(array $column): string { - throw $this->createNotSupportedException(); + throw NotSupported::new(__METHOD__); } - public function getClobTypeDeclarationSQL(array $field): string + public function getIntegerTypeDeclarationSQL(array $column): string { - throw $this->createNotSupportedException(); + throw NotSupported::new(__METHOD__); } - public function getIntegerTypeDeclarationSQL(array $columnDef): string + public function getSmallIntTypeDeclarationSQL(array $column): string { - throw $this->createNotSupportedException(); + throw NotSupported::new(__METHOD__); } - public function getSmallIntTypeDeclarationSQL(array $columnDef): string + public function getTimeTypeDeclarationSQL(array $column): string { - throw $this->createNotSupportedException(); + throw NotSupported::new(__METHOD__); } public function getCurrentDatabaseExpression(): string { - throw $this->createNotSupportedException(); + throw NotSupported::new(__METHOD__); + } + + public function getLocateExpression(string $string, string $substring, string $start = null): string + { + throw NotSupported::new(__METHOD__); + } + + public function getDateDiffExpression(string $date1, string $date2): string + { + throw NotSupported::new(__METHOD__); + } + + protected function getDateArithmeticIntervalExpression(string $date, string $operator, string $interval, DateIntervalUnit $unit): string + { + throw NotSupported::new(__METHOD__); + } + + public function getAlterTableSQL(TableDiff $diff): array + { + throw NotSupported::new(__METHOD__); + } + + public function getListViewsSQL(string $database): string + { + throw NotSupported::new(__METHOD__); + } + + public function getSetTransactionIsolationSQL(TransactionIsolationLevel $level): string + { + throw NotSupported::new(__METHOD__); + } + + protected function createReservedKeywordsList(): KeywordList + { + throw NotSupported::new(__METHOD__); + } + + public function createSchemaManager(Connection $connection): AbstractSchemaManager + { + throw NotSupported::new(__METHOD__); } }