Passed
Pull Request — master (#2893)
by Šimon
12:53
created

PostgreSQL100Platform::getReservedKeywordsClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Doctrine\DBAL\Platforms;
6
7
use Doctrine\DBAL\Platforms\Keywords\PostgreSQL100Keywords;
8
9
/**
10
 * Provides the behavior, features and SQL dialect of the PostgreSQL 10.0 database platform.
11
 *
12
 * @link   www.doctrine-project.org
13
 * @since  2.6
14
 */
15
class PostgreSQL100Platform extends PostgreSQL94Platform
16
{
17
    /**
18
     * {@inheritdoc}
19
     */
20 51
    protected function getReservedKeywordsClass() : string
21
    {
22 51
        return PostgreSQL100Keywords::class;
23
    }
24
25
    public function getListSequencesSQL($database) : string
26
    {
27
        return "SELECT sequence_name AS relname,
28
                       sequence_schema AS schemaname,
29
                       minimum_value AS min_value, 
30
                       increment AS increment_by
31
                FROM   information_schema.sequences
32
                WHERE  sequence_catalog = '" . $database . "'  
33
                AND    sequence_schema NOT LIKE 'pg\_%'
34
                AND    sequence_schema != 'information_schema'";
35
    }
36
}
37