Total Complexity | 5 |
Total Lines | 37 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | trait BuildsParamLimitFixQueries |
||
11 | { |
||
12 | /** |
||
13 | * The maximum number of parameters per query. |
||
14 | * |
||
15 | * The values are lower than the actual limits |
||
16 | * to have a margin for polymorphic relationships |
||
17 | * and other query parameters. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $parameterLimits = [ |
||
22 | MySqlConnection::class => 65000, |
||
23 | PostgresConnection::class => 65000, |
||
24 | SQLiteConnection::class => 900, |
||
25 | SqlServerConnection::class => 2000, |
||
26 | ]; |
||
27 | |||
28 | /** |
||
29 | * Eager load the relationships for the models. |
||
30 | * |
||
31 | * @param array $models |
||
32 | 1 | * @return array |
|
33 | */ |
||
34 | 1 | public function eagerLoadRelations(array $models) |
|
49 |