-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?php | ||
|
||
namespace Doctrine\DBAL\Platforms\Keywords; | ||
|
||
use Doctrine\Deprecations\Deprecation; | ||
|
||
use function array_merge; | ||
|
||
/** | ||
* MySQL 8.4 reserved keywords list. | ||
*/ | ||
class MySQL84Keywords extends MySQL80Keywords | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* | ||
* @deprecated | ||
*/ | ||
public function getName() | ||
{ | ||
Deprecation::triggerIfCalledFromOutside( | ||
'doctrine/dbal', | ||
'https://github.com/doctrine/dbal/pull/5433', | ||
'MySQL84Keywords::getName() is deprecated.', | ||
); | ||
|
||
return 'MySQL84'; | ||
} | ||
|
||
/** | ||
* {@inheritDoc} | ||
* | ||
* @link https://dev.mysql.com/doc/refman/8.4/en/keywords.html#keywords-new-in-current-series | ||
*/ | ||
protected function getKeywords() | ||
{ | ||
$keywords = parent::getKeywords(); | ||
|
||
$keywords = array_merge($keywords, [ | ||
'AUTO', | ||
'BERNOULLI', | ||
'GTIDS', | ||
'LOG', | ||
'MANUAL', | ||
'PARALLEL', | ||
'PARSE_TREE', | ||
'QUALIFY', | ||
'S3', | ||
'TABLESAMPLE', | ||
]); | ||
|
||
return $keywords; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
namespace Doctrine\DBAL\Platforms; | ||
|
||
use Doctrine\DBAL\SQL\Builder\SelectSQLBuilder; | ||
use Doctrine\Deprecations\Deprecation; | ||
|
||
/** | ||
* Provides the behavior, features and SQL dialect of the MySQL 8.4 (8.4 GA) database platform. | ||
*/ | ||
class MySQL84Platform extends MySQL80Platform | ||
{ | ||
/** | ||
* {@inheritDoc} | ||
* | ||
* @deprecated Implement {@see createReservedKeywordsList()} instead. | ||
*/ | ||
protected function getReservedKeywordsClass() | ||
{ | ||
Deprecation::triggerIfCalledFromOutside( | ||
'doctrine/dbal', | ||
'https://github.com/doctrine/dbal/issues/4510', | ||
'MySQL84Platform::getReservedKeywordsClass() is deprecated,' | ||
. ' use MySQL84Platform::createReservedKeywordsList() instead.', | ||
); | ||
|
||
return Keywords\MySQL84Keywords::class; | ||
} | ||
|
||
public function createSelectSQLBuilder(): SelectSQLBuilder | ||
{ | ||
return AbstractPlatform::createSelectSQLBuilder(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters