Completed
Push — master ( 226980...c1625e )
by Hong
02:50
created

Select::getType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Phossa Project
4
 *
5
 * PHP version 5.4
6
 *
7
 * @category  Library
8
 * @package   Phossa2\Query
9
 * @copyright Copyright (c) 2016 phossa.com
10
 * @license   http://mit-license.org/ MIT License
11
 * @link      http://www.phossa.com/
12
 */
13
/*# declare(strict_types=1); */
14
15
namespace Phossa2\Query\Dialect\Common;
16
17
use Phossa2\Query\Traits\Clause\ColTrait;
18
use Phossa2\Query\Traits\Clause\FromTrait;
19
use Phossa2\Query\Traits\Clause\JoinTrait;
20
use Phossa2\Query\Traits\StatementAbstract;
21
use Phossa2\Query\Traits\Clause\WhereTrait;
22
use Phossa2\Query\Traits\Clause\LimitTrait;
23
use Phossa2\Query\Traits\Clause\UnionTrait;
24
use Phossa2\Query\Traits\Clause\ClauseTrait;
25
use Phossa2\Query\Traits\Clause\HavingTrait;
26
use Phossa2\Query\Traits\Clause\GroupByTrait;
27
use Phossa2\Query\Traits\Clause\OrderByTrait;
28
use Phossa2\Query\Interfaces\Statement\SelectStatementInterface;
29
30
/**
31
 * Select
32
 *
33
 * Implementation of SelectStatementInterface for Common dialect
34
 *
35
 * @package Phossa2\Query
36
 * @author  Hong Zhang <[email protected]>
37
 * @see     StatementAbstract
38
 * @see     SelectStatementInterface
39
 * @version 2.0.0
40
 * @since   2.0.0 added
41
 */
42
class Select extends StatementAbstract implements SelectStatementInterface
43
{
44
    use ClauseTrait, ColTrait, FromTrait, WhereTrait, JoinTrait,
45
        GroupByTrait, HavingTrait, OrderByTrait, LimitTrait, UnionTrait;
46
47
    /**
48
     * {@inheritDoc}
49
     */
50
    protected $configs = [
51
        'DISTINCT' => '',
52
        'COL' => '',
53
        'FROM' => 'FROM',
54
        'JOIN' => '',
55
        'WHERE' => 'WHERE',
56
        'GROUPBY' => 'GROUP BY',
57
        'HAVING' => 'HAVING',
58
        'ORDERBY' => 'ORDER BY',
59
        'LIMIT' => 'LIMIT',
60
        'UNION' => '',
61
    ];
62
63
    /**
64
     * {@inheritDoc}
65
     */
66
    protected function getType()/*# : string */
67
    {
68
        return 'SELECT';
69
    }
70
}
71