| Conditions | 4 |
| Paths | 8 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 4 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | public function compileCreateView($name, $query, $columns, $orReplace, bool $materialized = false) |
||
| 18 | 40 | { |
|
| 19 | $orReplaceSql = $orReplace ? 'or replace ' : ''; |
||
| 20 | 40 | ||
| 21 | $materializedSql = $materialized ? 'materialized ' : ''; |
||
| 22 | 40 | ||
| 23 | $columns = $columns ? '('.$this->columnize($columns).') ' : ''; |
||
|
|
|||
| 24 | |||
| 25 | return 'create '.$orReplaceSql.$materializedSql.'view '.$this->wrapTable($name).' '.$columns.'as '.$query; |
||
| 26 | } |
||
| 53 |