classMySqlGrammar
final class MySqlGrammar
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
MySQL grammar loader.
Loads pre-compiled grammar from the ast/mysql-*.php cache files.
Methods§
public static function load(string|null $version = null): GrammarLoad a pre-compiled MySQL grammar.
Parameters
$version | string|null | MySQL version tag (e.g., "mysql-8.4.7"). Null for default. |
Returns
Test cases 13
StartRuleResolverTest::testStartSymbolForMapsModernRequestsToLegacyGrammarRulescallsStartRuleResolverTest::testStartSymbolForPreservesGrammarEntryEvenWhenStatementRulesExistcallsStartRuleResolverTest::testStartSymbolForTakesARuleThisReleaseDeclaresAsItStandscallsMySqlGrammarTest::testLoadcovers and callsMySqlGrammarTest::testLoadedGrammarHasExpectedStructurecovers and callsMySqlGrammarTest::testLoadedGrammarStructurecovers and callsMySqlGrammarTest::testLoadedGrammarVersionsProduceDifferentRuleCountscovers and callsMySqlGrammarTest::testLoadPreservesCompiledStructurecovers and callsMySqlGrammarTest::testLoadWithDefaultVersioncovers and callsMySqlGrammarTest::testLoadWithExplicitVersioncovers and callsMySqlGrammarTest::testLoadWithExplicitVersionPreservesCompiledStructurecovers and callsMySqlGrammarTest::testLoadWithNonExistentVersionThrowscovers and callsMySqlGrammarTest::testLoadWithNonExistentVersionThrowsExceptioncovers and calls
Called from 1
Calls 2
- static-call SqlVersion::resolve() line 27
- static-call Grammar::loadFromFile() line 29
public static function resolveVersion(string|null $version = null): stringAnswers the release a version string names, defaulting to the newest one shipped.
Parameters
$version | string|null | Release to resolve, or null for the default |
Returns
string Name of the release the artifacts were generated forThrows
RuntimeException When the release is not one this package shipsTest cases 2
Called from 2
Calls 1
- static-call SqlVersion::resolve() line 43
Test cases 20§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 12
MySqlGrammarTest::testLoadcovers and callsMySqlGrammarTest::testLoadedGrammarHasExpectedStructurecovers and callsMySqlGrammarTest::testLoadedGrammarStructurecovers and callsMySqlGrammarTest::testLoadedGrammarVersionsProduceDifferentRuleCountscovers and callsMySqlGrammarTest::testLoadPreservesCompiledStructurecovers and callsMySqlGrammarTest::testLoadWithDefaultVersioncovers and callsMySqlGrammarTest::testLoadWithExplicitVersioncovers and callsMySqlGrammarTest::testLoadWithExplicitVersionPreservesCompiledStructurecovers and callsMySqlGrammarTest::testLoadWithNonExistentVersionThrowscovers and callsMySqlGrammarTest::testLoadWithNonExistentVersionThrowsExceptioncovers and callsMySqlGrammarTest::testResolveVersionUsesExactConfiguredDefaultcovers and callsMySqlGrammarTest::testResolveVersionUsesExactConfiguredDefaultPreservesCompiledStructurecovers and calls
Other tests reaching this symbol 8
GenerationContextTestcallsStartRuleResolverTest::testStartSymbolForMapsModernRequestsToLegacyGrammarRulescallsStartRuleResolverTest::testStartSymbolForPreservesGrammarEntryEvenWhenStatementRulesExistcallsStartRuleResolverTest::testStartSymbolForTakesARuleThisReleaseDeclaresAsItStandscallsMySqlProviderTestcallsPostgreSqlProviderTestcallsSqlGeneratorFactoryTestcallsSqliteProviderTestcalls
Relations§
Static calls 3
- static-call SqlFaker\MySql\Generation\GenerationContext::__construct() packages/sql-faker/src/MySql/Generation/GenerationContext.php:53
- static-call SqlFaker\MySqlProvider::__construct() packages/sql-faker/src/MySqlProvider.php:70
- static-call SqlFaker\MySqlProvider::__construct() packages/sql-faker/src/MySqlProvider.php:71