classShowCreateView
final class ShowCreateView
implements Statement
uses Snapshot
Public API: explicitly declared with
@visibility public.SHOW CREATE VIEW: the statement that creates a view.
Rule: MYSQL-SHOW-CREATE-VIEW-001. The view resolves by MYSQL-SHOW-TARGET-001; a declared base table is refused (MYSQL-RELATION-KIND-001). The columns are those of the layout of MYSQL-SHOW-ROWS-001. Terminates: a fixed layout. Source: https://dev.mysql.com/doc/refman/8.4/en/show-create-view.html. Status: Implemented.
$show = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SHOW CREATE VIEW v');
[$show->field(0)->name?->value, $show->toString()] // => ['View', 'SHOW CREATE VIEW v']Properties§
public InspectedTable $viewMethods§
public function __construct(public InspectedTable $view)Parameters
$view | InspectedTable | The view |
public function deriveStatement(Derivation $derivation): voidDerives the rows.
Parameters
$derivation | Derivation |
Calls 8
- method-call RelationKinds::require() line 48
- new RelationKinds line 48
- method-call ShowTargets::derive() line 48
- new ShowTargets line 48
- class-const RelationKind::View() line 48
- method-call ShowFacts::rows() line 49
- new ShowFacts line 49
- class-const Report::CreateView() line 49
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Relations§
Instantiated in 2
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\LegacyObjectRule::schema() packages/sql-semantics-mysql/src/Lowering/Utility/Show/LegacyObjectRule.php:134
- new SqlSemantics\Platform\MySql\Lowering\Utility\Show\ObjectRule::definition() packages/sql-semantics-mysql/src/Lowering/Utility/Show/ObjectRule.php:105