Conditions | 5 |
Paths | 5 |
Total Lines | 25 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function getEagerLimitGrammar() |
||
21 | { |
||
22 | $connection = $this->query->getQuery()->getConnection(); |
||
23 | $driver = $connection->getDriverName(); |
||
24 | |||
25 | switch ($driver) { |
||
26 | case 'mysql': |
||
27 | return $connection->withTablePrefix( |
||
28 | new MySqlGrammar() |
||
29 | ); |
||
30 | case 'pgsql': |
||
31 | return $connection->withTablePrefix( |
||
32 | new PostgresGrammar() |
||
33 | ); |
||
34 | case 'sqlite': |
||
35 | return $connection->withTablePrefix( |
||
36 | new SQLiteGrammar() |
||
37 | ); |
||
38 | case 'sqlsrv': |
||
39 | return $connection->withTablePrefix( |
||
40 | new SqlServerGrammar() |
||
41 | ); |
||
42 | } |
||
43 | |||
44 | throw new RuntimeException('This database is not supported.'); // @codeCoverageIgnore |
||
|
|||
45 | } |
||
47 |