classConnectionRule
final class ConnectionRule
Lowers ATTACH and DETACH.
Rule: SQLITE-CONNECTION-LOWER-001. Scope: the cmd productions of ATTACH and DETACH, with database_kw_opt and key_opt. Constructors: Attach, Detach, NameOperand. An operand that is one identifier inside any number of parentheses lowers to a NameOperand inside as many groupings, because SQLite reads it as text; every other operand is an ordinary expression. The DATABASE keyword is declared noise. Terminates: the parentheses around an operand are counted in a loop over a strict subtree chain. Source: https://sqlite.org/lang_attach.html, https://sqlite.org/lang_detach.html. Status: Implemented.
Methods§
public function __construct(private Lowering $lowering)Parameters
$lowering | Lowering | The lowering this rule belongs to |
Lowers ATTACH or DETACH, or answers null for a command of another family.
Parameters
$form | Form |
Returns
Called from 1
Calls 6
- new Attach line 48
- method-call ConnectionRule::operand() line 49
- method-call ConnectionRule::keyword() line 49
- method-call Form::node() line 49
- method-call ConnectionRule::key() line 51
- new Detach line 53
Checks the optional DATABASE keyword and answers the operand that follows it.
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\ConnectionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/ConnectionRule.php:49
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\ConnectionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/ConnectionRule.php:53
Calls 1
- static-call ImplementationGap::production() line 69
Lowers the optional key expression.
Parameters
$key | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 2
- method-call ConnectionRule::operand() line 84
- static-call ImplementationGap::production() line 85
Lowers an operand: an identifier is the text of its name, anything else an expression.
Parameters
$expression | Node |
Returns
Called from 4
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\ConnectionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/ConnectionRule.php:49
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\ConnectionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/ConnectionRule.php:50
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\ConnectionRule::command() packages/sql-semantics-sqlite/src/Lowering/Definition/ConnectionRule.php:53
- method-call SqlSemantics\Platform\Sqlite\Lowering\Definition\ConnectionRule::key() packages/sql-semantics-sqlite/src/Lowering/Definition/ConnectionRule.php:84
Calls 2
- new NameOperand line 103
- new Grouped line 105
Private surface 1§
Implementation details, listed for orientation only.
private 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
ConnectionRuleTestcalls