11<?php
2+
23/**
34 * Licensed to CRATE Technology GmbH("Crate") under one or more contributor
45 * license agreements. See the NOTICE file distributed with this work for
1920 * with Crate these terms will supersede the license and you may use the
2021 * software solely pursuant to the terms of the relevant commercial agreement.
2122 */
23+
2224namespace Crate \DBAL \Platforms ;
2325
2426use Crate \DBAL \Types \MapType ;
2830use Doctrine \DBAL \Events ;
2931use Doctrine \DBAL \Exception as DBALException ;
3032use Doctrine \DBAL \Platforms \AbstractPlatform ;
33+ use Doctrine \DBAL \Schema \ForeignKeyConstraint ;
3134use Doctrine \DBAL \Schema \Identifier ;
3235use Doctrine \DBAL \Schema \Index ;
3336use Doctrine \DBAL \Schema \Table ;
3437use Doctrine \DBAL \Schema \TableDiff ;
3538use Doctrine \DBAL \Types \Type ;
36- use Doctrine \DBAL \Schema \ForeignKeyConstraint ;
3739use InvalidArgumentException ;
3840
3941class CratePlatform extends AbstractPlatform
4042{
41-
42- const TIMESTAMP_FORMAT = 'Y-m-d\TH:i:s ' ;
43- const TIMESTAMP_FORMAT_TZ = 'Y-m-d\TH:i:sO ' ;
44- const TABLE_WHERE_CLAUSE_FORMAT = '%s.table_name = %s AND %s.schema_name = %s ' ;
43+ public const TIMESTAMP_FORMAT = 'Y-m-d\TH:i:s ' ;
44+ public const TIMESTAMP_FORMAT_TZ = 'Y-m-d\TH:i:sO ' ;
45+ public const TABLE_WHERE_CLAUSE_FORMAT = '%s.table_name = %s AND %s.schema_name = %s ' ;
4546
4647 /**
4748 * {@inheritDoc}
@@ -605,7 +606,7 @@ public function getCreateTableSQL(Table $table, $createFlags = self::CREATE_INDE
605606 $ options ['indexes ' ] = array ();
606607 $ options ['primary ' ] = array ();
607608
608- if (($ createFlags& self ::CREATE_INDEXES ) > 0 ) {
609+ if (($ createFlags & self ::CREATE_INDEXES ) > 0 ) {
609610 foreach ($ table ->getIndexes () as $ index ) {
610611 /* @var $index Index */
611612 if ($ index ->isPrimary ()) {
@@ -686,7 +687,7 @@ protected function _getCreateTableSQL($name, array $columns, array $options = ar
686687 $ columnListSql .= ', ' . $ this ->getIndexDeclarationSQL ($ index , $ definition );
687688 }
688689 }
689-
690+
690691 if (isset ($ options ['foreignKeys ' ])) {
691692 throw DBALException::notSupported ("Create Table: foreign keys " );
692693 }
@@ -831,15 +832,15 @@ public function getDropDatabaseSQL($database)
831832 {
832833 throw DBALException::notSupported (__METHOD__ );
833834 }
834-
835+
835836 /**
836837 * {@inheritDoc}
837838 */
838839 public function getCreateForeignKeySQL (ForeignKeyConstraint $ foreignKey , $ table )
839840 {
840841 throw DBALException::notSupported (__METHOD__ );
841842 }
842-
843+
843844 /**
844845 * {@inheritDoc}
845846 */
@@ -854,7 +855,7 @@ public function getGuidTypeDeclarationSQL(array $field)
854855 *
855856 * @return string
856857 */
857- public function getTableOptionsSQL (string $ table ) : string
858+ public function getTableOptionsSQL (string $ table ): string
858859 {
859860 return "SELECT clustered_by, number_of_shards, partitioned_by, number_of_replicas, column_policy, settings " .
860861 "FROM information_schema.tables c " .
0 commit comments