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