Completed
Push — master ( 8f800b...a10bf5 )
by Biao
03:46
created

CoroutineMySQLConnection::getDriverName()   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 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Hhxsv5\LaravelS\Illuminate\Database;
4
5
use Illuminate\Database\MySqlConnection;
6
7
class CoroutineMySQLConnection extends MySqlConnection
8
{
9
    /**
10
     * The active swoole mysql connection.
11
     *
12
     * @var CoroutineMySQL
13
     */
14
    protected $pdo;
15
16
    /**
17
     * The active swoole mysql used for reads.
18
     *
19
     * @var CoroutineMySQL
20
     */
21
    protected $readPdo;
22
23
    public function __construct($pdo, $database = '', $tablePrefix = '', array $config = [])
24
    {
25
        $this->pdo = $pdo;
26
        $this->database = $database;
27
        $this->tablePrefix = $tablePrefix;
28
        $this->config = $config;
29
        $this->useDefaultQueryGrammar();
30
        $this->useDefaultPostProcessor();
31
    }
32
33
    public function getDriverName()
34
    {
35
        return 'Swoole Coroutine MySQL';
36
    }
37
38
}