classVirtualTableRule
final class VirtualTableRule
Lowers virtual table definitions.
Rule: SQLITE-VIRTUAL-TABLE-LOWER-001. Scope: cmd: create_vtab, cmd: create_vtab LP vtabarglist RP, create_vtab, vtabarglist, vtabarg, vtabargtoken, lp, anylist. Constructors: CreateVirtualTable, ModuleArgument. The grammar accepts any tokens as an argument; each argument lowers to the exact text of its token span (SQLITE-MODULE-ARGUMENT-TEXT-001), so no token of an argument is dropped or respelled. Terminates: the argument subtrees are walked with an explicit stack. Source: https://sqlite.org/lang_createvtab.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Calls 1
Lowers a virtual table definition, or answers null for a command of another family.
Parameters
$form | Form |
Returns
Called from 1
Calls 3
- method-call VirtualTableRule::table() line 65
- method-call Form::node() line 65
- method-call VirtualTableRule::arguments() line 66
public function table(Node $head, list<ModuleArgument>|null $arguments): CreateVirtualTableLowers the head of a virtual table definition and attaches the arguments.
Parameters
$head | Node | |
$arguments | list<ModuleArgument>|null |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\VirtualTableRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/VirtualTableRule.php:65
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\VirtualTableRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/VirtualTableRule.php:66
Calls 3
- static-call ImplementationGap::production() line 81
- method-call CreateTableRule::created() line 83
- new CreateVirtualTable line 87
public function arguments(Node $list): list<ModuleArgument>Lowers the argument list to the exact text of each argument, in order.
Parameters
$list | Node |
Returns
list<ModuleArgument>Throws
ImplementationGap When a production has no ruleCalled from 1
Calls 8
- function-call
array_popline 100 - function-call
in_arrayline 105 - class-const VirtualTableRule::ARGUMENT_PRODUCTIONS() line 105
- static-call ImplementationGap::production() line 106
- function-call
array_pushline 108 - method-call ModuleArguments::texts() line 111
- new ModuleArguments line 111
- new ModuleArgument line 112
Private surface 3§
Implementation details, listed for orientation only.
private const ARGUMENT_PRODUCTIONS = ['vtabarglist: vtabarg', 'vtabarglist: vtabarglist COMMA vtabarg', 'vtabarg:', …private CreateTableRule $tablesprivate Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
VirtualTableRuleTestcalls