summaryrefslogtreecommitdiffstats
path: root/vendor/ipl/sql/src/Sql.php
blob: 000a43a0992493f422b3de15bb7153886786eaf5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php

namespace ipl\Sql;

/**
 * The SQL helper provides a set of static methods for quoting and escaping identifiers to make their use safe in SQL
 * queries or fragments
 */
class Sql
{
    /**
     * SQL AND operator
     */
    public const ALL = 'AND';

    /**
     * SQL OR operator
     */
    public const ANY = 'OR';

    /**
     * SQL AND NOT operator
     */
    public const NOT_ALL = 'AND NOT';

    /**
     * SQL OR NOT operator
     */
    public const NOT_ANY = 'OR NOT';

    /**
     * Create and return a DELETE statement
     *
     * @return Delete
     */
    public static function delete()
    {
        return new Delete();
    }

    /**
     * Create and return a INSERT statement
     *
     * @return Insert
     */
    public static function insert()
    {
        return new Insert();
    }

    /**
     * Create and return a SELECT statement
     *
     * @return Select
     */
    public static function select()
    {
        return new Select();
    }

    /**
     * Create and return a UPDATE statement
     *
     * @return Update
     */
    public static function update()
    {
        return new Update();
    }
}