| Total Complexity | 4 |
| Total Lines | 53 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class SQLiteGrammar extends Base implements ExpressionGrammar |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Compile an initial path. |
||
| 12 | * |
||
| 13 | * @param string $column |
||
| 14 | * @param string $alias |
||
| 15 | * @return string |
||
| 16 | */ |
||
| 17 | 49 | public function compileInitialPath($column, $alias) |
|
| 18 | { |
||
| 19 | 49 | return 'cast('.$this->wrap($column).' as text) as '.$this->wrap($alias); |
|
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Compile a recursive path. |
||
| 24 | * |
||
| 25 | * @param string $column |
||
| 26 | * @param string $alias |
||
| 27 | * @return string |
||
| 28 | */ |
||
| 29 | 49 | public function compileRecursivePath($column, $alias) |
|
| 30 | { |
||
| 31 | 49 | return $this->wrap($alias).' || ? || '.$this->wrap($column); |
|
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get the recursive path bindings. |
||
| 36 | * |
||
| 37 | * @param string $separator |
||
| 38 | * @return array |
||
| 39 | */ |
||
| 40 | 49 | public function getRecursivePathBindings($separator) |
|
| 41 | { |
||
| 42 | 49 | return [$separator]; |
|
| 43 | } |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Select a concatenated list of paths. |
||
| 47 | * |
||
| 48 | * @param \Illuminate\Database\Query\Builder $query |
||
| 49 | * @param string $expression |
||
| 50 | * @param string $column |
||
| 51 | * @param string $pathSeparator |
||
| 52 | * @param string $listSeparator |
||
| 53 | * @return \Illuminate\Database\Query\Builder |
||
| 54 | */ |
||
| 55 | 4 | public function selectPathList(Builder $query, $expression, $column, $pathSeparator, $listSeparator) |
|
| 61 | } |
||
| 62 | } |
||
| 63 |