Passed
Pull Request — master (#2)
by Ryosuke
16:37 queued 06:47
created

SQLiteGrammar::compileGroupLimit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 8
rs 10
cc 1
nc 1
nop 1
1
<?php
2
3
namespace Mpyw\ComposhipsEagerLimit\Database\Query\Grammar;
4
5
use Staudenmeir\EloquentEagerLimit\Grammars\SQLiteGrammar as EagerLimitSQLiteGrammar;
6
7
class SQLiteGrammar extends EagerLimitSQLiteGrammar
8
{
9
    use Concerns\CompilesGroupLimitByMultipleColumnPartition;
10
11
    /**
12
     * Compile a group limit clause.
13
     *
14
     * @param \Illuminate\Database\Query\Builder $query
15
     * @return string
16
     */
17
    protected function compileGroupLimit(\Illuminate\Database\Query\Builder $query)
18
    {
19
        $version = $query->getConnection()->getPdo()->getAttribute(\PDO::ATTR_SERVER_VERSION);
20
21
        // FIXME: For debugging
22
        \Illuminate\Support\Facades\Log::debug("The PDO server version is: $version");
23
24
        return parent::compileGroupLimit($query);
25
    }
26
}
27