Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
namespace Doctrine\DBAL\Platforms\Keywords;
4
 
5
use Doctrine\Deprecations\Deprecation;
6
 
7
use function array_merge;
8
 
9
/**
10
 * MySQL 8.0 reserved keywords list.
11
 */
12
class MySQL80Keywords extends MySQL57Keywords
13
{
14
    /**
15
     * {@inheritdoc}
16
     *
17
     * @deprecated
18
     */
19
    public function getName()
20
    {
21
        Deprecation::triggerIfCalledFromOutside(
22
            'doctrine/dbal',
23
            'https://github.com/doctrine/dbal/pull/5433',
24
            'MySQL80Keywords::getName() is deprecated.',
25
        );
26
 
27
        return 'MySQL80';
28
    }
29
 
30
    /**
31
     * {@inheritdoc}
32
     *
33
     * @link https://dev.mysql.com/doc/refman/8.0/en/keywords.html
34
     */
35
    protected function getKeywords()
36
    {
37
        $keywords = parent::getKeywords();
38
 
39
        $keywords = array_merge($keywords, [
40
            'ADMIN',
41
            'ARRAY',
42
            'CUBE',
43
            'CUME_DIST',
44
            'DENSE_RANK',
45
            'EMPTY',
46
            'EXCEPT',
47
            'FIRST_VALUE',
48
            'FUNCTION',
49
            'GROUPING',
50
            'GROUPS',
51
            'JSON_TABLE',
52
            'LAG',
53
            'LAST_VALUE',
54
            'LATERAL',
55
            'LEAD',
56
            'MEMBER',
57
            'NTH_VALUE',
58
            'NTILE',
59
            'OF',
60
            'OVER',
61
            'PERCENT_RANK',
62
            'PERSIST',
63
            'PERSIST_ONLY',
64
            'RANK',
65
            'RECURSIVE',
66
            'ROW',
67
            'ROWS',
68
            'ROW_NUMBER',
69
            'SYSTEM',
70
            'WINDOW',
71
        ]);
72
 
73
        return $keywords;
74
    }
75
}