| Conditions | 4 |
| Paths | 4 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 51 | 32 | protected function getEagerLimitGrammar() |
|
| 52 | { |
||
| 53 | 32 | $connection = $this->query->getQuery()->getConnection(); |
|
| 54 | 32 | $driver = $connection->getDriverName(); |
|
| 55 | |||
| 56 | 32 | switch ($driver) { |
|
| 57 | 32 | case 'mysql': |
|
| 58 | 16 | return $connection->withTablePrefix( |
|
| 59 | 16 | new MySqlGrammar() |
|
| 60 | ); |
||
| 61 | 16 | case 'pgsql': |
|
| 62 | 8 | return $connection->withTablePrefix( |
|
| 63 | 8 | new PostgresGrammar() |
|
| 64 | ); |
||
| 65 | 8 | case 'sqlite': |
|
| 66 | 8 | return $connection->withTablePrefix( |
|
| 67 | 8 | new SQLiteGrammar() |
|
| 68 | ); |
||
| 69 | } |
||
| 70 | |||
| 71 | throw new RuntimeException('This database is not supported.'); // @codeCoverageIgnore |
||
| 72 | } |
||
| 74 |