Completed
Pull Request — 2.x (#106)
by Hari
120:21 queued 101:04
created

Select::bigResult()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php
2
/**
3
 *
4
 * This file is part of Aura for PHP.
5
 *
6
 * @license http://opensource.org/licenses/bsd-license.php BSD
7
 *
8
 */
9
namespace Aura\SqlQuery\Mysql;
10
11
use Aura\SqlQuery\Common;
12
13
/**
14
 *
15
 * An object for MySQL SELECT queries.
16
 *
17
 * @package Aura.SqlQuery
18
 *
19
 */
20
class Select extends Common\Select
21
{
22
    /**
23
     *
24
     * Adds or removes SQL_CALC_FOUND_ROWS flag.
25
     *
26
     * @param bool $enable Set or unset flag (default true).
27
     *
28
     * @return $this
29
     *
30
     */
31 2
    public function calcFoundRows($enable = true)
32
    {
33
        $this->setFlag('SQL_CALC_FOUND_ROWS', $enable);
34 2
        return $this;
35 2
    }
36
37
    /**
38
     *
39
     * Adds or removes SQL_CACHE flag.
40
     *
41
     * @param bool $enable Set or unset flag (default true).
42
     *
43
     * @return $this
44
     *
45
     */
46 1
    public function cache($enable = true)
47
    {
48
        $this->setFlag('SQL_CACHE', $enable);
49 1
        return $this;
50 1
    }
51
52
    /**
53
     *
54
     * Adds or removes SQL_NO_CACHE flag.
55
     *
56
     * @param bool $enable Set or unset flag (default true).
57
     *
58
     * @return $this
59
     *
60
     */
61 2
    public function noCache($enable = true)
62
    {
63
        $this->setFlag('SQL_NO_CACHE', $enable);
64 2
        return $this;
65 2
    }
66
67
    /**
68
     *
69
     * Adds or removes STRAIGHT_JOIN flag.
70
     *
71
     * @param bool $enable Set or unset flag (default true).
72
     *
73
     * @return $this
74
     *
75
     */
76 1
    public function straightJoin($enable = true)
77
    {
78
        $this->setFlag('STRAIGHT_JOIN', $enable);
79 1
        return $this;
80 1
    }
81
82
    /**
83
     *
84
     * Adds or removes HIGH_PRIORITY flag.
85
     *
86
     * @param bool $enable Set or unset flag (default true).
87
     *
88
     * @return $this
89
     *
90
     */
91 1
    public function highPriority($enable = true)
92
    {
93
        $this->setFlag('HIGH_PRIORITY', $enable);
94 1
        return $this;
95 1
    }
96
97
    /**
98
     *
99
     * Adds or removes SQL_SMALL_RESULT flag.
100
     *
101
     * @param bool $enable Set or unset flag (default true).
102
     *
103
     * @return $this
104
     *
105
     */
106 1
    public function smallResult($enable = true)
107
    {
108
        $this->setFlag('SQL_SMALL_RESULT', $enable);
109 1
        return $this;
110 1
    }
111
112
    /**
113
     *
114
     * Adds or removes SQL_BIG_RESULT flag.
115
     *
116
     * @param bool $enable Set or unset flag (default true).
117
     *
118
     * @return $this
119
     *
120
     */
121 1
    public function bigResult($enable = true)
122
    {
123
        $this->setFlag('SQL_BIG_RESULT', $enable);
124 1
        return $this;
125 1
    }
126
127
    /**
128
     *
129
     * Adds or removes SQL_BUFFER_RESULT flag.
130
     *
131
     * @param bool $enable Set or unset flag (default true).
132
     *
133
     * @return $this
134
     *
135
     */
136 1
    public function bufferResult($enable = true)
137
    {
138
        $this->setFlag('SQL_BUFFER_RESULT', $enable);
139 1
        return $this;
140 1
    }
141
}
142