Completed
Push — resets ( d2f77b )
by Paul
02:06
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 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
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\Sqlite;
10
11
use Aura\SqlQuery\Common;
12
13
/**
14
 *
15
 * An object for Sqlite DELETE queries.
16
 *
17
 * @package Aura.SqlQuery
18
 *
19
 */
20
class Delete extends Common\Delete implements Common\OrderByInterface, Common\LimitOffsetInterface
21
{
22
    /**
23
     *
24
     * Sets a limit count on the query.
25
     *
26
     * @param int $limit The number of rows to select.
27
     *
28
     * @return $this
29
     *
30
     */
31 2
    public function limit($limit)
32
    {
33 2
        $this->limit = (int) $limit;
34 2
        return $this;
35
    }
36
37
    /**
38
     *
39
     * Returns the LIMIT value.
40
     *
41
     * @return int
42
     *
43
     */
44 1
    public function getLimit()
45
    {
46 1
        return $this->limit;
47
    }
48
49
    /**
50
     *
51
     * Sets a limit offset on the query.
52
     *
53
     * @param int $offset Start returning after this many rows.
54
     *
55
     * @return $this
56
     *
57
     */
58 2
    public function offset($offset)
59
    {
60 2
        $this->offset = (int) $offset;
61 2
        return $this;
62
    }
63
64
    /**
65
     *
66
     * Returns the OFFSET value.
67
     *
68
     * @return int
69
     *
70
     */
71 1
    public function getOffset()
72
    {
73 1
        return $this->offset;
74
    }
75
76
    /**
77
     *
78
     * Adds a column order to the query.
79
     *
80
     * @param array $spec The columns and direction to order by.
81
     *
82
     * @return $this
83
     *
84
     */
85 1
    public function orderBy(array $spec)
86
    {
87 1
        return $this->addOrderBy($spec);
88
    }
89
}
90