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

PostgreSQL100Platform::getListSequencesSQL()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 0
cts 2
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 2
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