QueryFactory::createMinus()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
/**
3
 * Author: Nil Portugués Calderó <[email protected]>
4
 * Date: 6/3/14
5
 * Time: 12:07 AM.
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace NilPortugues\Sql\QueryBuilder\Manipulation;
12
13
use NilPortugues\Sql\QueryBuilder\Syntax\Where;
14
15
/**
16
 * Class QueryFactory.
17
 */
18
final class QueryFactory
19
{
20
    /**
21
     * @param string $table
22
     * @param array  $columns
23
     *
24
     * @return Select
25
     */
26
    public static function createSelect($table = null, array $columns = null)
27
    {
28
        return new Select($table, $columns);
29
    }
30
31
    /**
32
     * @param string $table
33
     * @param array  $values
34
     *
35
     * @return Insert
36
     */
37
    public static function createInsert($table = null, array $values = null)
38
    {
39
        return new Insert($table, $values);
40
    }
41
42
    /**
43
     * @param string $table
44
     * @param array  $values
45
     *
46
     * @return Update
47
     */
48
    public static function createUpdate($table = null, array $values = null)
49
    {
50
        return new Update($table, $values);
51
    }
52
53
    /**
54
     * @param string $table
55
     *
56
     * @return Delete
57
     */
58
    public static function createDelete($table = null)
59
    {
60
        return new Delete($table);
61
    }
62
63
    /**
64
     * @param QueryInterface $query
65
     *
66
     * @return Where
67
     */
68
    public static function createWhere(QueryInterface $query)
69
    {
70
        return new Where($query);
71
    }
72
73
    /**
74
     * @return Intersect
75
     */
76
    public static function createIntersect()
77
    {
78
        return new Intersect();
79
    }
80
81
    /**
82
     * @param Select $first
83
     * @param Select $second
84
     *
85
     * @return Minus
86
     */
87
    public static function createMinus(Select $first, Select $second)
88
    {
89
        return new Minus($first, $second);
90
    }
91
92
    /**
93
     * @return Union
94
     */
95
    public static function createUnion()
96
    {
97
        return new Union();
98
    }
99
100
    /**
101
     * @return UnionAll
102
     */
103
    public static function createUnionAll()
104
    {
105
        return new UnionAll();
106
    }
107
}
108