Completed
Push — master ( d1533d...b79559 )
by Jared
02:59 queued 40s
created

SqlQuery::initialize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
nc 1
cc 1
eloc 1
nop 0
1
<?php
2
3
/**
4
 * @author Jared King <[email protected]>
5
 *
6
 * @link http://jaredtking.com
7
 *
8
 * @copyright 2015 Jared King
9
 * @license MIT
10
 */
11
namespace JAQB\Query;
12
13
class SqlQuery extends Query
14
{
15
    use SelectableTrait;
16
17
    /**
18
     * @var string
19
     */
20
    protected $sql;
21
22
    public function initialize()
23
    {
24
        // NOOP
25
    }
26
27
    /**
28
     * Sets the SQL for the query.
29
     *
30
     * @param string $sql
31
     *
32
     * @return self
33
     */
34
    public function raw($sql)
35
    {
36
        $this->sql = $sql;
37
38
        return $this;
39
    }
40
41
    /**
42
     * Sets the parameters for this query to be injected into
43
     * the prepared statement.
44
     *
45
     * @return self
46
     */
47
    public function parameters(array $values)
48
    {
49
        $this->values = $values;
50
51
        return $this;
52
    }
53
54
    public function build()
55
    {
56
        return $this->sql;
57
    }
58
}
59