Completed
Pull Request — 3.x (#120)
by
unknown
01:47
created

Delete::getLimit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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 UPDATE queries.
16
 *
17
 * @package Aura.SqlQuery
18
 *
19
 */
20
class Delete extends Common\Delete implements Common\OrderByInterface, Common\LimitInterface
21
{
22
    use Common\LimitTrait;
23
24
    /**
25
     *
26
     * Adds or removes LOW_PRIORITY flag.
27
     *
28
     * @param bool $enable Set or unset flag (default true).
29
     *
30
     * @return $this
31
     *
32
     */
33 1
    public function lowPriority($enable = true)
34
    {
35 1
        $this->setFlag('LOW_PRIORITY', $enable);
36 1
        return $this;
37
    }
38
39
    /**
40
     *
41
     * Adds or removes IGNORE flag.
42
     *
43
     * @param bool $enable Set or unset flag (default true).
44
     *
45
     * @return $this
46
     *
47
     */
48 1
    public function ignore($enable = true)
49
    {
50 1
        $this->setFlag('IGNORE', $enable);
51 1
        return $this;
52
    }
53
54
    /**
55
     *
56
     * Adds or removes QUICK flag.
57
     *
58
     * @param bool $enable Set or unset flag (default true).
59
     *
60
     * @return $this
61
     *
62
     */
63 1
    public function quick($enable = true)
64
    {
65 1
        $this->setFlag('QUICK', $enable);
66 1
        return $this;
67
    }
68
69
    /**
70
     *
71
     * Adds a column order to the query.
72
     *
73
     * @param array $spec The columns and direction to order by.
74
     *
75
     * @return $this
76
     *
77
     */
78 1
    public function orderBy(array $spec)
79
    {
80 1
        return $this->addOrderBy($spec);
81
    }
82
}
83