Skip to content

Commit 8229304

Browse files
committed
Add MariaDB contexts based on the corresponding MySQL versions
Fixes #4 Signed-off-by: Michal Čihař <[email protected]>
1 parent 87c59f9 commit 8229304

10 files changed

+3965
-2
lines changed

src/Contexts/ContextMariaDb100000.php

Lines changed: 313 additions & 0 deletions
Large diffs are not rendered by default.

src/Contexts/ContextMariaDb100100.php

Lines changed: 362 additions & 0 deletions
Large diffs are not rendered by default.

src/Contexts/ContextMariaDb100200.php

Lines changed: 362 additions & 0 deletions
Large diffs are not rendered by default.

tools/ContextGenerator.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ class ContextGenerator
3737
'MySql50600' => 'https://dev.mysql.com/doc/refman/5.6/en/keywords.html',
3838
'MySql50700' => 'https://dev.mysql.com/doc/refman/5.7/en/keywords.html',
3939
'MySql80000' => 'https://dev.mysql.com/doc/refman/8.0/en/keywords.html',
40+
'MariaDb100000' => 'https://mariadb.com/kb/en/the-mariadb-library/reserved-words/',
41+
'MariaDb100100' => 'https://mariadb.com/kb/en/the-mariadb-library/reserved-words/',
42+
'MariaDb100200' => 'https://mariadb.com/kb/en/the-mariadb-library/reserved-words/',
4043
);
4144

4245
/**
@@ -283,8 +286,8 @@ public static function build($input, $output)
283286
* @var string
284287
*/
285288
$formattedName = str_replace(
286-
array('Context', 'MySql', '00', '0'),
287-
array('', 'MySQL ', '', '.'),
289+
array('Context', 'MySql', 'MariaDb', '00', '0'),
290+
array('', 'MySQL ', 'MariaDB ', '', '.'),
288291
$class
289292
);
290293

0 commit comments

Comments
 (0)