Complex classes like SQLAnywherePlatform often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use SQLAnywherePlatform, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
41 | class SQLAnywherePlatform extends AbstractPlatform |
||
42 | { |
||
43 | public const FOREIGN_KEY_MATCH_SIMPLE = 1; |
||
44 | public const FOREIGN_KEY_MATCH_FULL = 2; |
||
45 | public const FOREIGN_KEY_MATCH_SIMPLE_UNIQUE = 129; |
||
46 | public const FOREIGN_KEY_MATCH_FULL_UNIQUE = 130; |
||
47 | 10731 | ||
48 | /** |
||
49 | 10731 | * {@inheritdoc} |
|
50 | */ |
||
51 | 10658 | public function appendLockHint(string $fromClause, ?int $lockMode) : string |
|
52 | { |
||
53 | 10723 | switch (true) { |
|
54 | 10608 | case $lockMode === LockMode::NONE: |
|
55 | return $fromClause . ' WITH (NOLOCK)'; |
||
56 | 10715 | ||
57 | 10583 | case $lockMode === LockMode::PESSIMISTIC_READ: |
|
58 | return $fromClause . ' WITH (UPDLOCK)'; |
||
59 | |||
60 | 10707 | case $lockMode === LockMode::PESSIMISTIC_WRITE: |
|
61 | return $fromClause . ' WITH (XLOCK)'; |
||
62 | |||
63 | default: |
||
64 | return $fromClause; |
||
65 | } |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | 10533 | * {@inheritdoc} |
|
70 | * |
||
71 | 10533 | * SQL Anywhere supports a maximum length of 128 bytes for identifiers. |
|
72 | */ |
||
73 | 10533 | public function fixSchemaElementName(string $schemaElementName) : string |
|
74 | 10533 | { |
|
75 | $maxIdentifierLength = $this->getMaxIdentifierLength(); |
||
76 | |||
77 | 10533 | if (strlen($schemaElementName) > $maxIdentifierLength) { |
|
78 | return substr($schemaElementName, 0, $maxIdentifierLength); |
||
79 | } |
||
80 | |||
81 | return $schemaElementName; |
||
82 | } |
||
83 | 10806 | ||
84 | /** |
||
85 | 10806 | * {@inheritdoc} |
|
86 | */ |
||
87 | 10806 | public function getAdvancedForeignKeyOptionsSQL(ForeignKeyConstraint $foreignKey) : string |
|
88 | 10308 | { |
|
89 | $query = ''; |
||
90 | |||
91 | 10806 | if ($foreignKey->hasOption('match')) { |
|
92 | $query = ' MATCH ' . $this->getForeignKeyMatchClauseSQL($foreignKey->getOption('match')); |
||
93 | 10806 | } |
|
94 | 10308 | ||
95 | $query .= parent::getAdvancedForeignKeyOptionsSQL($foreignKey); |
||
96 | |||
97 | 10806 | if ($foreignKey->hasOption('check_on_commit') && (bool) $foreignKey->getOption('check_on_commit')) { |
|
98 | 10308 | $query .= ' CHECK ON COMMIT'; |
|
99 | } |
||
100 | |||
101 | 10806 | if ($foreignKey->hasOption('clustered') && (bool) $foreignKey->getOption('clustered')) { |
|
102 | 10308 | $query .= ' CLUSTERED'; |
|
103 | } |
||
104 | |||
105 | 10806 | if ($foreignKey->hasOption('for_olap_workload') && (bool) $foreignKey->getOption('for_olap_workload')) { |
|
106 | $query .= ' FOR OLAP WORKLOAD'; |
||
107 | } |
||
108 | |||
109 | return $query; |
||
110 | } |
||
111 | 10820 | ||
112 | /** |
||
113 | 10820 | * {@inheritdoc} |
|
114 | 10820 | */ |
|
115 | 10820 | public function getAlterTableSQL(TableDiff $diff) : array |
|
116 | 10820 | { |
|
117 | 10820 | $sql = []; |
|
118 | $columnSql = []; |
||
119 | 10820 | $commentsSQL = []; |
|
120 | 8907 | $tableSql = []; |
|
121 | $alterClauses = []; |
||
122 | |||
123 | foreach ($diff->addedColumns as $column) { |
||
124 | 8907 | if ($this->onSchemaAlterTableAddColumn($column, $diff, $columnSql)) { |
|
125 | continue; |
||
126 | 8907 | } |
|
127 | |||
128 | 8907 | $alterClauses[] = $this->getAlterTableAddColumnClause($column); |
|
129 | 8899 | ||
130 | $comment = $this->getColumnComment($column); |
||
131 | |||
132 | 8783 | if ($comment === null || $comment === '') { |
|
133 | 8783 | continue; |
|
134 | 8783 | } |
|
135 | 8 | ||
136 | $commentsSQL[] = $this->getCommentOnColumnSQL( |
||
137 | $diff->getName($this)->getQuotedName($this), |
||
138 | $column->getQuotedName($this), |
||
139 | 10820 | $comment |
|
140 | 8899 | ); |
|
141 | } |
||
142 | |||
143 | foreach ($diff->removedColumns as $column) { |
||
144 | 8899 | if ($this->onSchemaAlterTableRemoveColumn($column, $diff, $columnSql)) { |
|
145 | continue; |
||
146 | } |
||
147 | 10820 | ||
148 | 10764 | $alterClauses[] = $this->getAlterTableRemoveColumnClause($column); |
|
149 | } |
||
150 | |||
151 | foreach ($diff->changedColumns as $columnDiff) { |
||
152 | 10764 | if ($this->onSchemaAlterTableChangeColumn($columnDiff, $diff, $columnSql)) { |
|
153 | continue; |
||
154 | 10764 | } |
|
155 | 8915 | ||
156 | $alterClause = $this->getAlterTableChangeColumnClause($columnDiff); |
||
157 | |||
158 | 10764 | if ($alterClause !== null) { |
|
159 | 8915 | $alterClauses[] = $alterClause; |
|
160 | } |
||
161 | |||
162 | 10724 | if (! $columnDiff->hasChanged('comment')) { |
|
163 | continue; |
||
164 | 10724 | } |
|
165 | 10724 | ||
166 | 10724 | $column = $columnDiff->column; |
|
167 | 10724 | ||
168 | $commentsSQL[] = $this->getCommentOnColumnSQL( |
||
169 | $diff->getName($this)->getQuotedName($this), |
||
170 | $column->getQuotedName($this), |
||
171 | 10820 | $this->getColumnComment($column) |
|
172 | 8857 | ); |
|
173 | } |
||
174 | |||
175 | foreach ($diff->renamedColumns as $oldColumnName => $column) { |
||
176 | 8857 | if ($this->onSchemaAlterTableRenameColumn($oldColumnName, $column, $diff, $columnSql)) { |
|
177 | 8857 | continue; |
|
178 | } |
||
179 | |||
180 | 10820 | $sql[] = $this->getAlterTableClause($diff->getName($this)) . ' ' . |
|
181 | 10820 | $this->getAlterTableRenameColumnClause($oldColumnName, $column); |
|
182 | 8923 | } |
|
183 | |||
184 | if (! $this->onSchemaAlterTable($diff, $tableSql)) { |
||
185 | 10820 | if (! empty($alterClauses)) { |
|
186 | $sql[] = $this->getAlterTableClause($diff->getName($this)) . ' ' . implode(', ', $alterClauses); |
||
187 | 10820 | } |
|
188 | |||
189 | 10820 | $sql = array_merge($sql, $commentsSQL); |
|
190 | 8891 | ||
191 | 8891 | $newName = $diff->getNewName(); |
|
192 | |||
193 | if ($newName !== null) { |
||
194 | 10820 | $sql[] = $this->getAlterTableClause($diff->getName($this)) . ' ' . |
|
195 | 10820 | $this->getAlterTableRenameTableClause($newName); |
|
196 | 10820 | } |
|
197 | 10820 | ||
198 | $sql = array_merge( |
||
199 | $this->getPreAlterTableIndexForeignKeySQL($diff), |
||
200 | $sql, |
||
201 | 10820 | $this->getPostAlterTableIndexForeignKeySQL($diff) |
|
202 | ); |
||
203 | } |
||
204 | |||
205 | return array_merge($sql, $tableSql, $columnSql); |
||
206 | } |
||
207 | |||
208 | /** |
||
209 | * Returns the SQL clause for creating a column in a table alteration. |
||
210 | * |
||
211 | 8907 | * @param Column $column The column to add. |
|
212 | */ |
||
213 | 8907 | protected function getAlterTableAddColumnClause(Column $column) : string |
|
214 | { |
||
215 | return 'ADD ' . $this->getColumnDeclarationSQL($column->getQuotedName($this), $column->toArray()); |
||
216 | } |
||
217 | |||
218 | /** |
||
219 | * Returns the SQL clause for altering a table. |
||
220 | * |
||
221 | * @param Identifier $tableName The quoted name of the table to alter. |
||
222 | */ |
||
223 | 8939 | protected function getAlterTableClause(Identifier $tableName) : string |
|
227 | |||
228 | /** |
||
229 | * Returns the SQL clause for dropping a column in a table alteration. |
||
230 | * |
||
231 | * @param Column $column The column to drop. |
||
232 | */ |
||
233 | protected function getAlterTableRemoveColumnClause(Column $column) : string |
||
237 | 8899 | ||
238 | /** |
||
239 | * Returns the SQL clause for renaming a column in a table alteration. |
||
240 | * |
||
241 | * @param string $oldColumnName The quoted name of the column to rename. |
||
242 | * @param Column $column The column to rename to. |
||
243 | */ |
||
244 | protected function getAlterTableRenameColumnClause(string $oldColumnName, Column $column) : string |
||
250 | 8857 | ||
251 | /** |
||
252 | 8857 | * Returns the SQL clause for renaming a table in a table alteration. |
|
253 | * |
||
254 | * @param Identifier $newTableName The quoted name of the table to rename to. |
||
255 | */ |
||
256 | protected function getAlterTableRenameTableClause(Identifier $newTableName) : string |
||
260 | |||
261 | /** |
||
262 | 8891 | * Returns the SQL clause for altering a column in a table alteration. |
|
263 | * |
||
264 | 8891 | * This method returns null in case that only the column comment has changed. |
|
265 | * Changes in column comments have to be handled differently. |
||
266 | * |
||
267 | * @param ColumnDiff $columnDiff The diff of the column to alter. |
||
268 | */ |
||
269 | protected function getAlterTableChangeColumnClause(ColumnDiff $columnDiff) : ?string |
||
287 | |||
288 | /** |
||
289 | * {@inheritdoc} |
||
290 | 8915 | */ |
|
291 | public function getBigIntTypeDeclarationSQL(array $columnDef) : string |
||
297 | |||
298 | /** |
||
299 | 10508 | * {@inheritdoc} |
|
300 | */ |
||
301 | 10508 | public function getBlobTypeDeclarationSQL(array $field) : string |
|
305 | |||
306 | /** |
||
307 | * {@inheritdoc} |
||
308 | * |
||
309 | 9691 | * BIT type columns require an explicit NULL declaration |
|
310 | * in SQL Anywhere if they shall be nullable. |
||
311 | 9691 | * Otherwise by just omitting the NOT NULL clause, |
|
312 | * SQL Anywhere will declare them NOT NULL nonetheless. |
||
313 | */ |
||
314 | public function getBooleanTypeDeclarationSQL(array $columnDef) : string |
||
320 | |||
321 | /** |
||
322 | * {@inheritdoc} |
||
323 | */ |
||
324 | public function getClobTypeDeclarationSQL(array $field) : string |
||
328 | |||
329 | /** |
||
330 | * {@inheritdoc} |
||
331 | */ |
||
332 | public function getCommentOnColumnSQL(string $tableName, string $columnName, ?string $comment) : string |
||
345 | |||
346 | /** |
||
347 | * {@inheritdoc} |
||
348 | 10524 | */ |
|
349 | public function getConcatExpression(string ...$string) : string |
||
353 | |||
354 | /** |
||
355 | * {@inheritdoc} |
||
356 | 10764 | */ |
|
357 | public function getCreateConstraintSQL(Constraint $constraint, $table) : string |
||
370 | |||
371 | /** |
||
372 | * {@inheritdoc} |
||
373 | 9983 | */ |
|
374 | public function getCreateDatabaseSQL(string $database) : string |
||
380 | |||
381 | 10174 | /** |
|
382 | * {@inheritdoc} |
||
383 | 10174 | * |
|
384 | 8933 | * Appends SQL Anywhere specific flags if given. |
|
385 | */ |
||
386 | public function getCreateIndexSQL(Index $index, $table) : string |
||
390 | |||
391 | 10174 | /** |
|
392 | 10174 | * {@inheritdoc} |
|
393 | */ |
||
394 | public function getCreatePrimaryKeySQL(Index $index, $table) : string |
||
402 | 10458 | ||
403 | /** |
||
404 | * {@inheritdoc} |
||
405 | */ |
||
406 | public function getCreateTemporaryTableSnippetSQL() : string |
||
410 | 10841 | ||
411 | /** |
||
412 | 10841 | * {@inheritdoc} |
|
413 | */ |
||
414 | public function getCreateViewSQL(string $name, string $sql) : string |
||
418 | 10387 | ||
419 | /** |
||
420 | 10387 | * {@inheritdoc} |
|
421 | 10383 | */ |
|
422 | public function getCurrentDateSQL() : string |
||
426 | |||
427 | /** |
||
428 | * {@inheritdoc} |
||
429 | */ |
||
430 | 10458 | public function getCurrentTimeSQL() : string |
|
434 | |||
435 | /** |
||
436 | * {@inheritdoc} |
||
437 | */ |
||
438 | 10458 | public function getCurrentTimestampSQL() : string |
|
442 | |||
443 | /** |
||
444 | * {@inheritdoc} |
||
445 | */ |
||
446 | 9991 | protected function getDateArithmeticIntervalExpression(string $date, string $operator, string $interval, string $unit) : string |
|
456 | 9983 | ||
457 | /** |
||
458 | * {@inheritdoc} |
||
459 | */ |
||
460 | public function getDateDiffExpression(string $date1, string $date2) : string |
||
464 | 9991 | ||
465 | /** |
||
466 | * {@inheritdoc} |
||
467 | */ |
||
468 | public function getDateTimeFormatString() : string |
||
472 | 9983 | ||
473 | /** |
||
474 | 9983 | * {@inheritdoc} |
|
475 | 9983 | */ |
|
476 | public function getDateTimeTypeDeclarationSQL(array $fieldDeclaration) : string |
||
480 | |||
481 | /** |
||
482 | * {@inheritdoc} |
||
483 | */ |
||
484 | 9983 | public function getDateTimeTzFormatString() : string |
|
488 | |||
489 | /** |
||
490 | * {@inheritdoc} |
||
491 | */ |
||
492 | 9987 | public function getDateTypeDeclarationSQL(array $fieldDeclaration) : string |
|
496 | |||
497 | /** |
||
498 | * {@inheritdoc} |
||
499 | */ |
||
500 | 10508 | public function getDefaultTransactionIsolationLevel() : int |
|
504 | |||
505 | /** |
||
506 | * {@inheritdoc} |
||
507 | */ |
||
508 | 9954 | public function getDropDatabaseSQL(string $database) : string |
|
514 | |||
515 | /** |
||
516 | 10508 | * {@inheritdoc} |
|
517 | */ |
||
518 | 10508 | public function getDropIndexSQL($index, $table = null) : string |
|
546 | |||
547 | /** |
||
548 | 10074 | * {@inheritdoc} |
|
549 | 10033 | */ |
|
550 | 10033 | public function getDropViewSQL(string $name) : string |
|
554 | 10066 | ||
555 | 10058 | /** |
|
556 | * {@inheritdoc} |
||
557 | */ |
||
558 | 10066 | public function getForeignKeyBaseDeclarationSQL(ForeignKeyConstraint $foreignKey) : string |
|
591 | 10798 | ||
592 | /** |
||
593 | * Returns foreign key MATCH clause for given type. |
||
594 | 10830 | * |
|
595 | 10233 | * @param int $type The foreign key match type |
|
596 | * |
||
597 | * @throws InvalidArgumentException If unknown match type given. |
||
598 | 10822 | */ |
|
599 | 10208 | public function getForeignKeyMatchClauseSQL(int $type) : string |
|
620 | |||
621 | /** |
||
622 | * {@inheritdoc} |
||
623 | */ |
||
624 | public function getForeignKeyReferentialActionSQL(string $action) : string |
||
633 | 10283 | ||
634 | /** |
||
635 | * {@inheritdoc} |
||
636 | 10324 | */ |
|
637 | 10316 | public function getForUpdateSQL() : string |
|
641 | 10283 | ||
642 | /** |
||
643 | 10258 | * {@inheritdoc} |
|
644 | */ |
||
645 | public function getGuidTypeDeclarationSQL(array $column) : string |
||
649 | |||
650 | 10364 | /** |
|
651 | * {@inheritdoc} |
||
652 | */ |
||
653 | 10364 | public function getIndexDeclarationSQL(string $name, Index $index) : string |
|
658 | |||
659 | /** |
||
660 | * {@inheritdoc} |
||
661 | */ |
||
662 | public function getIntegerTypeDeclarationSQL(array $columnDef) : string |
||
668 | |||
669 | /** |
||
670 | * {@inheritdoc} |
||
671 | */ |
||
672 | public function getListDatabasesSQL() : string |
||
676 | |||
677 | /** |
||
678 | * {@inheritdoc} |
||
679 | */ |
||
680 | public function getListTableColumnsSQL(string $table, ?string $database = null) : string |
||
713 | |||
714 | /** |
||
715 | * {@inheritdoc} |
||
716 | 9583 | * |
|
717 | * @todo Where is this used? Which information should be retrieved? |
||
718 | 9583 | */ |
|
719 | public function getListTableConstraintsSQL(string $table) : string |
||
744 | |||
745 | 9583 | /** |
|
746 | 9583 | * {@inheritdoc} |
|
747 | */ |
||
748 | public function getListTableForeignKeysSQL(string $table, ?string $database = null) : string |
||
837 | |||
838 | /** |
||
839 | * {@inheritdoc} |
||
840 | */ |
||
841 | public function getListTableIndexesSQL(string $table, ?string $currentDatabase = null) : string |
||
897 | |||
898 | /** |
||
899 | * {@inheritdoc} |
||
900 | */ |
||
901 | public function getListTablesSQL() : string |
||
912 | |||
913 | /** |
||
914 | * {@inheritdoc} |
||
915 | * |
||
916 | * @todo Where is this used? Which information should be retrieved? |
||
917 | */ |
||
918 | public function getListUsersSQL() : string |
||
922 | |||
923 | /** |
||
924 | * {@inheritdoc} |
||
925 | */ |
||
926 | public function getListViewsSQL(string $database) : string |
||
936 | |||
937 | /** |
||
938 | * {@inheritdoc} |
||
939 | */ |
||
940 | public function getLocateExpression(string $string, string $substring, ?string $start = null) : string |
||
948 | |||
949 | /** |
||
950 | * {@inheritdoc} |
||
951 | */ |
||
952 | public function getMaxIdentifierLength() : int |
||
956 | |||
957 | /** |
||
958 | * {@inheritdoc} |
||
959 | */ |
||
960 | public function getMd5Expression(string $string) : string |
||
964 | |||
965 | /** |
||
966 | * {@inheritdoc} |
||
967 | */ |
||
968 | public function getRegexpExpression() : string |
||
972 | |||
973 | /** |
||
974 | * {@inheritdoc} |
||
975 | */ |
||
976 | 9983 | public function getName() : string |
|
980 | |||
981 | /** |
||
982 | 9983 | * Obtain DBMS specific SQL code portion needed to set a primary key |
|
983 | * declaration to be used in statements like ALTER TABLE. |
||
984 | * |
||
985 | * @param Index $index Index definition |
||
986 | * @param string $name Name of the primary key |
||
987 | * |
||
988 | 10566 | * @return string DBMS specific SQL code portion needed to set a primary key |
|
989 | * |
||
990 | 10566 | * @throws InvalidArgumentException If the given index is not a primary key. |
|
991 | */ |
||
992 | public function getPrimaryKeyDeclarationSQL(Index $index, ?string $name = null) : string |
||
1002 | |||
1003 | /** |
||
1004 | 9424 | * {@inheritdoc} |
|
1005 | */ |
||
1006 | 9424 | public function getSetTransactionIsolationSQL(int $level) : string |
|
1010 | |||
1011 | /** |
||
1012 | * {@inheritdoc} |
||
1013 | */ |
||
1014 | public function getSmallIntTypeDeclarationSQL(array $columnDef) : string |
||
1020 | 10453 | ||
1021 | /** |
||
1022 | 10453 | * Returns the SQL statement for starting an existing database. |
|
1023 | * |
||
1024 | * In SQL Anywhere you can start and stop databases on a |
||
1025 | * database server instance. |
||
1026 | * This is a required statement after having created a new database |
||
1027 | * as it has to be explicitly started to be usable. |
||
1028 | 10453 | * SQL Anywhere does not automatically start a database after creation! |
|
1029 | * |
||
1030 | * @param string $database Name of the database to start. |
||
1031 | */ |
||
1032 | public function getStartDatabaseSQL(string $database) : string |
||
1038 | |||
1039 | /** |
||
1040 | * Returns the SQL statement for stopping a running database. |
||
1041 | * |
||
1042 | 10508 | * In SQL Anywhere you can start and stop databases on a |
|
1043 | * database server instance. |
||
1044 | 10508 | * This is a required statement before dropping an existing database |
|
1045 | * as it has to be explicitly stopped before it can be dropped. |
||
1046 | 10508 | * |
|
1047 | * @param string $database Name of the database to stop. |
||
1048 | */ |
||
1049 | public function getStopDatabaseSQL(string $database) : string |
||
1055 | |||
1056 | /** |
||
1057 | * {@inheritdoc} |
||
1058 | */ |
||
1059 | public function getSubstringExpression(string $string, string $start, ?string $length = null) : string |
||
1067 | |||
1068 | /** |
||
1069 | * {@inheritdoc} |
||
1070 | */ |
||
1071 | public function getTemporaryTableSQL() : string |
||
1075 | |||
1076 | /** |
||
1077 | * {@inheritdoc} |
||
1078 | */ |
||
1079 | public function getTimeFormatString() : string |
||
1083 | 10458 | ||
1084 | /** |
||
1085 | 10458 | * {@inheritdoc} |
|
1086 | */ |
||
1087 | public function getTimeTypeDeclarationSQL(array $fieldDeclaration) : string |
||
1091 | 9983 | ||
1092 | /** |
||
1093 | 9983 | * {@inheritdoc} |
|
1094 | 9983 | */ |
|
1095 | public function getTrimExpression(string $str, int $mode = TrimMode::UNSPECIFIED, ?string $char = null) : string |
||
1126 | |||
1127 | 9983 | /** |
|
1128 | * {@inheritDoc} |
||
1129 | 9983 | */ |
|
1130 | 9983 | public function getCurrentDatabaseExpression() : string |
|
1134 | 9983 | ||
1135 | /** |
||
1136 | 9983 | * {@inheritdoc} |
|
1137 | */ |
||
1138 | public function getTruncateTableSQL(string $tableName, bool $cascade = false) : string |
||
1144 | 9983 | ||
1145 | /** |
||
1146 | 9983 | * {@inheritdoc} |
|
1147 | */ |
||
1148 | 9983 | public function getCreateSequenceSQL(Sequence $sequence) : string |
|
1155 | |||
1156 | 10466 | /** |
|
1157 | * {@inheritdoc} |
||
1158 | 10466 | */ |
|
1159 | public function getAlterSequenceSQL(Sequence $sequence) : string |
||
1164 | |||
1165 | /** |
||
1166 | 10382 | * {@inheritdoc} |
|
1167 | */ |
||
1168 | 10382 | public function getDropSequenceSQL($sequence) : string |
|
1176 | |||
1177 | /** |
||
1178 | * {@inheritdoc} |
||
1179 | */ |
||
1180 | public function getListSequencesSQL(string $database) : string |
||
1184 | |||
1185 | /** |
||
1186 | * {@inheritdoc} |
||
1187 | 10532 | */ |
|
1188 | public function getSequenceNextValSQL(string $sequenceName) : string |
||
1192 | |||
1193 | /** |
||
1194 | * {@inheritdoc} |
||
1195 | 10879 | */ |
|
1196 | public function supportsSequences() : bool |
||
1200 | |||
1201 | /** |
||
1202 | * {@inheritdoc} |
||
1203 | 11135 | */ |
|
1204 | public function getDateTimeTzTypeDeclarationSQL(array $fieldDeclaration) : string |
||
1208 | |||
1209 | /** |
||
1210 | * {@inheritdoc} |
||
1211 | 9733 | */ |
|
1212 | public function hasNativeGuidType() : bool |
||
1216 | |||
1217 | /** |
||
1218 | * {@inheritdoc} |
||
1219 | 10879 | */ |
|
1220 | public function prefersIdentityColumns() : bool |
||
1224 | |||
1225 | /** |
||
1226 | * {@inheritdoc} |
||
1227 | 8 | */ |
|
1228 | public function supportsCommentOnStatement() : bool |
||
1232 | |||
1233 | /** |
||
1234 | * {@inheritdoc} |
||
1235 | 10863 | */ |
|
1236 | public function supportsIdentityColumns() : bool |
||
1240 | 10863 | ||
1241 | /** |
||
1242 | * {@inheritdoc} |
||
1243 | */ |
||
1244 | protected function _getCommonIntegerTypeDeclarationSQL(array $columnDef) : string |
||
1251 | 10871 | ||
1252 | /** |
||
1253 | * {@inheritdoc} |
||
1254 | */ |
||
1255 | protected function _getCreateTableSQL(string $tableName, array $columns, array $options = []) : array |
||
1300 | 9900 | ||
1301 | 9908 | /** |
|
1302 | 9900 | * {@inheritdoc} |
|
1303 | 9908 | */ |
|
1304 | 9900 | protected function _getTransactionIsolationLevelSQL(int $level) : string |
|
1319 | 8158 | ||
1320 | /** |
||
1321 | * {@inheritdoc} |
||
1322 | 9890 | */ |
|
1323 | protected function doModifyLimitQuery(string $query, ?int $limit, int $offset) : string |
||
1337 | |||
1338 | private function getTopClauseSQL(?int $limit, ?int $offset) : string |
||
1346 | 10839 | ||
1347 | /** |
||
1348 | 10839 | * Return the INDEX query section dealing with non-standard |
|
1349 | * SQL Anywhere options. |
||
1350 | 10839 | * |
|
1351 | 10108 | * @param Index $index Index definition |
|
1352 | */ |
||
1353 | protected function getAdvancedIndexOptionsSQL(Index $index) : string |
||
1377 | 10509 | ||
1378 | /** |
||
1379 | 10509 | * Returns the SQL snippet for creating a table constraint. |
|
1380 | * |
||
1381 | * @param Constraint $constraint The table constraint to create the SQL snippet for. |
||
1382 | * @param string|null $name The table constraint name to use if any. |
||
1383 | 10509 | * |
|
1384 | 10133 | * @throws InvalidArgumentException If the given table constraint type is not supported by this method. |
|
1385 | */ |
||
1386 | protected function getTableConstraintDeclarationSQL(Constraint $constraint, ?string $name = null) : string |
||
1427 | |||
1428 | /** |
||
1429 | 10841 | * {@inheritdoc} |
|
1430 | 10124 | */ |
|
1431 | protected function getCreateIndexSQLFlags(Index $index) : string |
||
1448 | |||
1449 | /** |
||
1450 | * {@inheritdoc} |
||
1451 | 2829 | */ |
|
1452 | protected function getRenameIndexSQL(string $oldIndexName, Index $index, string $tableName) : array |
||
1456 | |||
1457 | /** |
||
1458 | * {@inheritdoc} |
||
1459 | 10871 | */ |
|
1460 | protected function getReservedKeywordsClass() : string |
||
1464 | |||
1465 | /** |
||
1466 | * {@inheritdoc} |
||
1467 | */ |
||
1468 | protected function initializeDoctrineTypeMappings() : void |
||
1512 | } |
||
1513 |
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.