classGenerationContext
final class GenerationContext
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Binds the Sqlite grammar and lexical declarations to the common SQL generation engine.
Properties§
public Grammar $grammarCommon grammar prepared for generation.
public LexicalGrammar $lexicalGrammarLexical realization for this release.
public TokenRewriter $rewriterDeclared structural transformations for this dialect.
public Closure(string|null): string|null $startSymbolMethods§
public function __construct(Grammar $grammar, Generator $faker, string|null $version = null)Prepares dialect inputs for the common generator.
Parameters
$grammar | Grammar | Common AST for this release |
$faker | Generator | Source of random lexical choices |
$version | string|null | Exact release or null for the declared default |
Throws
RuntimeException When the requested release is unavailableTest cases 5
GenerationContextTest::testBindsTheRequestedReleaseAndPreservesTheGrammarStartcoversGenerationContextTest::testLeavesThePlanInControlOfNullableProductionChoicescoversGenerationContextTest::testReportsAnUnknownNonterminalWithoutTreatingItAsSqlTextcoversGenerationContextTest::testReportsMissingLexicalImplementationWhenTheTerminalIsActuallyGeneratedcoversGenerationContextTest::testUsesTheGrammarStartWhenThePlanDoesNotSpecifyOnecovers
Calls 6
- new LexicalGrammar line 53
- static-call SqliteGrammar::resolveVersion() line 53
- method-call GrammarAdaptation::adapted() line 54
- new GrammarAdaptation line 54
- method-call RewriteDefinitions::create() line 55
- new RewriteDefinitions line 55
Test cases 9§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
GenerationContextTest::testBindsTheRequestedReleaseAndPreservesTheGrammarStartcovers and callsGenerationContextTest::testLeavesThePlanInControlOfNullableProductionChoicescovers and callsGenerationContextTest::testReportsAnUnknownNonterminalWithoutTreatingItAsSqlTextcovers and callsGenerationContextTest::testReportsMissingLexicalImplementationWhenTheTerminalIsActuallyGeneratedcovers and callsGenerationContextTest::testUsesTheGrammarStartWhenThePlanDoesNotSpecifyOnecovers and calls
Other tests reaching this symbol 4
MySqlProviderTestcallsPostgreSqlProviderTestcallsSqlGeneratorFactoryTestcallsSqliteProviderTestcalls