| Total Complexity | 4 |
| Total Lines | 58 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class SQLiteBuilder extends Base |
||
| 9 | { |
||
| 10 | use ManagesViews { |
||
| 11 | createView as createViewParent; |
||
| 12 | } |
||
| 13 | |||
| 14 | /** |
||
| 15 | * Create a new view on the schema. |
||
| 16 | * |
||
| 17 | * @param string $name |
||
| 18 | * @param \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|string $query |
||
| 19 | * @param array|null $columns |
||
| 20 | * @param bool $orReplace |
||
| 21 | * @return void |
||
| 22 | */ |
||
| 23 | 10 | public function createView($name, $query, array $columns = null, $orReplace = false) |
|
| 24 | { |
||
| 25 | 10 | if ($orReplace) { |
|
| 26 | 1 | $this->dropViewIfExists($name); |
|
| 27 | } |
||
| 28 | |||
| 29 | 10 | $this->createViewParent($name, $query, $columns); |
|
| 30 | 10 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * Rename a view on the schema. |
||
| 34 | * |
||
| 35 | * @param string $from |
||
| 36 | * @param string $to |
||
| 37 | * @return void |
||
| 38 | */ |
||
| 39 | 1 | public function renameView($from, $to) |
|
| 55 | 1 | } |
|
| 56 | |||
| 57 | /** |
||
| 58 | * Get the bindings for a "Has View" statement. |
||
| 59 | * |
||
| 60 | * @param string $view |
||
| 61 | * @return array |
||
| 62 | */ |
||
| 63 | 3 | protected function getBindingsForHasView($view) |
|
| 68 |