classViews
final class Views
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.
Derives CREATE VIEW.
Rule: PG-VIEW-001. The query is derived at the top level; for a RECURSIVE view the view name is bound in it as a recursive common table with the written column names ("CREATE RECURSIVE VIEW name (columns) AS SELECT
- ...; is equivalent to CREATE VIEW name AS WITH RECURSIVE name (columns) AS
- (SELECT ...) SELECT columns FROM name;"). The view is declared by
PG-QUERY-TABLE-001 with the NULL facts of the query and without system columns. UNLOGGED is reported: views have no storage. Source: https://www.postgresql.org/docs/17/sql-createview.html. Status: Implemented.
Methods§
public function derive(CreateView $view, Derivation $derivation, ?Name $schema): voidDerives a view; $schema is the schema of an enclosing CREATE SCHEMA.
Parameters
$view | CreateView | |
$derivation | Derivation | |
$schema | ?Name |
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Statement\Table\View\CreateView::deriveStatement() packages/sql-semantics-postgres/src/Statement/Table/View/CreateView.php:114
- method-call SqlSemantics\Platform\PostgreSql\Statement\Table\View\CreateView::deriveElement() packages/sql-semantics-postgres/src/Statement/Table/View/CreateView.php:122
Calls 17
- method-call Derivation::environment() line 39
- new Environment line 41
- new CommonBinding line 41
- new RowShape line 41
- method-call Derivation::query() line 43
- class-const Persistence::Unlogged() line 44
- method-call Derivation::report() line 45
- new DefinitionProblem line 45
- class-const DefinitionRule::UnloggedView() line 45
- method-call CreationSchemas::check() line 47
- new CreationSchemas line 47
- new QueryTables line 49
- method-call Derivation::declare() line 50
- method-call QueryTables::table() line 50
- method-call QueryTables::name() line 50
- class-const RelationKind::View() line 50
- class-const DefinitionRule::ViewColumnCount() line 50
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ViewsTestcalls
Relations§
Instantiated in 2
- new SqlSemantics\Platform\PostgreSql\Statement\Table\View\CreateView::deriveStatement() packages/sql-semantics-postgres/src/Statement/Table/View/CreateView.php:114
- new SqlSemantics\Platform\PostgreSql\Statement\Table\View\CreateView::deriveElement() packages/sql-semantics-postgres/src/Statement/Table/View/CreateView.php:122
Method calls 2
- method-call SqlSemantics\Platform\PostgreSql\Statement\Table\View\CreateView::deriveStatement() packages/sql-semantics-postgres/src/Statement/Table/View/CreateView.php:114
- method-call SqlSemantics\Platform\PostgreSql\Statement\Table\View\CreateView::deriveElement() packages/sql-semantics-postgres/src/Statement/Table/View/CreateView.php:122