Passed
Push — main ( 989106...9612b3 )
by Thierry
02:02
created

Connection::multiQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Lagdo\DbAdmin\Driver\Sqlite\Db\Pdo;
4
5
use Lagdo\DbAdmin\Driver\Db\Pdo\Connection as PdoConnection;
6
use Lagdo\DbAdmin\Driver\Sqlite\Db\ConfigTrait;
7
8
class Connection extends PdoConnection
9
{
10
    use ConfigTrait;
11
12
    public function multiQuery(string $query)
13
    {
14
        return $this->result = $this->query($query);
15
    }
16
17
    public function nextResult()
18
    {
19
        return false;
20
    }
21
22
    /**
23
     * @inheritDoc
24
     */
25
    public function open(string $database, string $schema = '')
26
    {
27
        $options = $this->driver->options();
28
        $filename = $this->filename($database, $options);
29
        $this->dsn("sqlite:$filename", "", "");
30
        $this->query("PRAGMA foreign_keys = 1");
31
        return true;
32
    }
33
}
34