Completed
Push — master ( f56a01...af237a )
by Hong
02:39
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\StatementAbstract;
20
use Phossa2\Query\Traits\Clause\WhereTrait;
21
use Phossa2\Query\Traits\Clause\LimitTrait;
22
use Phossa2\Query\Traits\Clause\UnionTrait;
23
use Phossa2\Query\Traits\Clause\ClauseTrait;
24
use Phossa2\Query\Traits\Clause\HavingTrait;
25
use Phossa2\Query\Traits\Clause\GroupByTrait;
26
use Phossa2\Query\Traits\Clause\OrderByTrait;
27
use Phossa2\Query\Interfaces\Statement\SelectStatementInterface;
28
29
/**
30
 * Select
31
 *
32
 * Implementation of SelectStatementInterface for Common dialect
33
 *
34
 * @package Phossa2\Query
35
 * @author  Hong Zhang <[email protected]>
36
 * @see     StatementAbstract
37
 * @see     SelectStatementInterface
38
 * @version 2.0.0
39
 * @since   2.0.0 added
40
 */
41
class Select extends StatementAbstract implements SelectStatementInterface
42
{
43
    use ClauseTrait, ColTrait, FromTrait, WhereTrait, GroupByTrait,
44
        HavingTrait, OrderByTrait, LimitTrait, UnionTrait;
45
46
    /**
47
     * {@inheritDoc}
48
     */
49
    protected $type = 'SELECT';
50
51
    /**
52
     * {@inheritDoc}
53
     */
54
    protected $configs = [
55
        'DISTINCT' => '',
56
        'COL' => '',
57
        'FROM' => 'FROM',
58
        'WHERE' => 'WHERE',
59
        'GROUPBY' => 'GROUP BY',
60
        'HAVING' => 'HAVING',
61
        'ORDERBY' => 'ORDER BY',
62
        'LIMIT' => 'LIMIT',
63
        'UNION' => 'UNION',
64
    ];
65
}
66