Completed
Push — resets ( d2f77b )
by Paul
02:06
created

Insert   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 5
c 2
b 0
f 0
lcom 1
cbo 1
dl 0
loc 77
ccs 15
cts 15
cp 1
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A orAbort() 0 5 1
A orFail() 0 5 1
A orIgnore() 0 5 1
A orReplace() 0 5 1
A orRollback() 0 5 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 INSERT queries.
16
 *
17
 * @package Aura.SqlQuery
18
 *
19
 */
20
class Insert extends Common\Insert
21
{
22
    /**
23
     *
24
     * Adds or removes OR ABORT flag.
25
     *
26
     * @param bool $enable Set or unset flag (default true).
27
     *
28
     * @return $this
29
     *
30
     */
31 1
    public function orAbort($enable = true)
32
    {
33 1
        $this->setFlag('OR ABORT', $enable);
34 1
        return $this;
35
    }
36
37
    /**
38
     *
39
     * Adds or removes OR FAIL flag.
40
     *
41
     * @param bool $enable Set or unset flag (default true).
42
     *
43
     * @return $this
44
     *
45
     */
46 1
    public function orFail($enable = true)
47
    {
48 1
        $this->setFlag('OR FAIL', $enable);
49 1
        return $this;
50
    }
51
52
    /**
53
     *
54
     * Adds or removes OR IGNORE flag.
55
     *
56
     * @param bool $enable Set or unset flag (default true).
57
     *
58
     * @return $this
59
     *
60
     */
61 1
    public function orIgnore($enable = true)
62
    {
63 1
        $this->setFlag('OR IGNORE', $enable);
64 1
        return $this;
65
    }
66
67
    /**
68
     *
69
     * Adds or removes OR REPLACE flag.
70
     *
71
     * @param bool $enable Set or unset flag (default true).
72
     *
73
     * @return $this
74
     *
75
     */
76 1
    public function orReplace($enable = true)
77
    {
78 1
        $this->setFlag('OR REPLACE', $enable);
79 1
        return $this;
80
    }
81
82
    /**
83
     *
84
     * Adds or removes OR ROLLBACK flag.
85
     *
86
     * @param bool $enable Set or unset flag (default true).
87
     *
88
     * @return $this
89
     *
90
     */
91 1
    public function orRollback($enable = true)
92
    {
93 1
        $this->setFlag('OR ROLLBACK', $enable);
94 1
        return $this;
95
    }
96
}
97