classGenerationPlans
final class GenerationPlans
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Names the generation plans this dialect's provider is built from.
A plan is how a caller says which SQL it wants, and the ones a provider offers are a fixed vocabulary rather than something each caller assembles. Naming them here keeps that vocabulary in one place and lets the provider read as a list of what it can generate.
Methods§
public static function quotedIdentifier(int $minLength, int $maxLength): GenerationPlan<true>Parameters
$minLength | int | |
$maxLength | int |
Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 29
- function-call
compactline 29
public static function stringLiteral(int $minLength, int $maxLength): GenerationPlan<true>Parameters
$minLength | int | |
$maxLength | int |
Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 37
- function-call
compactline 37
public static function integerLiteral(int $min, int $max): GenerationPlan<true>Parameters
$min | int | |
$max | int |
Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 45
- function-call
compactline 45
public static function decimalLiteral(int $precision, int $scale): GenerationPlan<true>Parameters
$precision | int | |
$scale | int |
Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 53
- function-call
compactline 53
public static function multiDmlStatement(
int $firstChoice,
int $secondChoice,
): GenerationPlan<true>Parameters
$firstChoice | int | |
$secondChoice | int |
Returns
GenerationPlan<true>Throws
InvalidArgumentException When a choice does not name one of the three DML statementsCalled from 1
Calls 4
- static-call ProductionPattern::containing() line 64
- new
InvalidArgumentExceptionline 68 - static-call GenerationPlan::constrained() line 71
- static-call ProductionPattern::exactly() line 73
public static function fullTextSearchStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 4
- static-call GenerationPlan::constrained() line 97
- static-call ProductionPattern::exactly() line 98
- static-call ProductionPattern::containing() line 99
- static-call ProductionPattern::nonEmpty() line 102
public static function insertFunctionUpsertStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 3
- static-call GenerationPlan::constrained() line 121
- static-call ProductionPattern::containing() line 122
- static-call ProductionPattern::exactly() line 123
public static function temporaryTableStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Called from 1
Calls 2
- static-call GenerationPlan::constrained() line 145
- static-call ProductionPattern::containing() line 146
public static function viewStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 2
- static-call GenerationPlan::constrained() line 156
- static-call ProductionPattern::containing() line 157
public static function generatedColumnStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Called from 1
Calls 3
- static-call GenerationPlan::constrained() line 167
- static-call ProductionPattern::containing() line 168
- static-call ProductionPattern::exactly() line 171
public static function foreignKeyCascadeStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Called from 1
Calls 4
- static-call GenerationPlan::constrained() line 183
- static-call ProductionPattern::containing() line 184
- static-call ProductionPattern::nonEmpty() line 186
- static-call ProductionPattern::exactly() line 189
public static function foreignKeyConstraint(): GenerationPlan<true>Returns
GenerationPlan<true>Called from 1
Calls 4
- static-call GenerationPlan::constrained() line 209
- static-call ProductionPattern::exactly() line 211
- static-call ProductionPattern::containing() line 215
- static-call ProductionPattern::nonEmpty() line 219
public static function statement(
non-empty-string $startRule,
int $maxDepth,
): GenerationPlan<false>Directs a bounded walk that grows one statement from its own rule.
Parameters
$startRule | non-empty-string | Rule the statement is grown from |
$maxDepth | int | How deep the walk may recurse |
Returns
GenerationPlan<false> Plan for one bounded statementTest cases 1
Called from 19
- static-call SqlFaker\Sqlite\Generation\GenerationPlans::statementOfType() packages/sql-faker/src/Sqlite/Generation/GenerationPlans.php:248
- static-call SqlFaker\Sqlite\SqliteProvider::selectStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:126
- static-call SqlFaker\Sqlite\SqliteProvider::insertStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:142
- static-call SqlFaker\Sqlite\SqliteProvider::updateStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:158
- static-call SqlFaker\Sqlite\SqliteProvider::deleteStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:174
- static-call SqlFaker\Sqlite\SqliteProvider::createTableStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:190
- static-call SqlFaker\Sqlite\SqliteProvider::alterTableStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:206
- static-call SqlFaker\Sqlite\SqliteProvider::dropTableStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:222
- static-call SqlFaker\Sqlite\SqliteProvider::simpleStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:238
- static-call SqlFaker\Sqlite\SqliteProvider::expr() packages/sql-faker/src/Sqlite/SqliteProvider.php:254
- static-call SqlFaker\Sqlite\SqliteProvider::term() packages/sql-faker/src/Sqlite/SqliteProvider.php:270
- static-call SqlFaker\Sqlite\SqliteProvider::whereClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:285
- static-call SqlFaker\Sqlite\SqliteProvider::orderByClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:300
- static-call SqlFaker\Sqlite\SqliteProvider::limitClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:315
- static-call SqlFaker\Sqlite\SqliteProvider::groupByClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:330
- static-call SqlFaker\Sqlite\SqliteProvider::havingClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:345
- static-call SqlFaker\Sqlite\SqliteProvider::fullname() packages/sql-faker/src/Sqlite/SqliteProvider.php:361
- static-call SqlFaker\Sqlite\SqliteProvider::withClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:376
- static-call SqlFaker\Sqlite\SqliteProvider::identifier() packages/sql-faker/src/Sqlite/SqliteProvider.php:410
Calls 1
- static-call GenerationPlan::fromRule() line 233
public static function statementOfType(
Generator $faker,
?StatementRule $type,
int $maxDepth,
): GenerationPlan<false>Selects a statement type when omitted and bounds its generation plan.
Parameters
$faker | Generator | |
$type | ?StatementRule | |
$maxDepth | int |
Returns
GenerationPlan<false>Test cases 2
Called from 1
Calls 3
- method-call
Generator::randomElement()line 245 - static-call StatementRule::cases() line 245
- static-call GenerationPlans::statement() line 248
Test cases 16§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 15
GenerationPlansTest::testDecimalLiteralPlansThatLexemecallsGenerationPlansTest::testForeignKeyCascadeStatementRequiresBothCascadeActionscallsGenerationPlansTest::testForeignKeyConstraintRestrictsTheTableConstraintGrammarcallsGenerationPlansTest::testFullTextSearchStatementRequiresMatchGrammarcallsGenerationPlansTest::testGeneratedColumnStatementRequiresTheGeneratedConstraintcallsGenerationPlansTest::testInsertFunctionUpsertStatementRestrictsTheConflictFunctionGrammarcallsGenerationPlansTest::testIntegerLiteralPlansThatLexemecallsGenerationPlansTest::testMultiDmlStatementDirectsBothStatementOccurrencescallsGenerationPlansTest::testQuotedIdentifierPlansThatLexemecallsGenerationPlansTest::testStatementBoundsTheWalkAtTheRuleItIsGrownFromcallsGenerationPlansTest::testStatementOfTypePreservesAnExplicitTypeWithoutConsumingRandomnesscallsGenerationPlansTest::testStatementOfTypeUsesTheSeededFakerChoiceWhenNoTypeIsSpecifiedcallsGenerationPlansTest::testStringLiteralPlansThatLexemecallsGenerationPlansTest::testTemporaryTableStatementRequiresTheTemporaryProductioncallsGenerationPlansTest::testViewStatementRestrictsTheCreateGrammarcalls
Other tests reaching this symbol 1
SqliteProviderTestcalls
Relations§
Static calls 31
- static-call SqlFaker\Sqlite\SqliteProvider::sql() packages/sql-faker/src/Sqlite/SqliteProvider.php:110
- static-call SqlFaker\Sqlite\SqliteProvider::selectStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:126
- static-call SqlFaker\Sqlite\SqliteProvider::insertStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:142
- static-call SqlFaker\Sqlite\SqliteProvider::updateStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:158
- static-call SqlFaker\Sqlite\SqliteProvider::deleteStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:174
- static-call SqlFaker\Sqlite\SqliteProvider::createTableStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:190
- static-call SqlFaker\Sqlite\SqliteProvider::alterTableStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:206
- static-call SqlFaker\Sqlite\SqliteProvider::dropTableStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:222
- static-call SqlFaker\Sqlite\SqliteProvider::simpleStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:238
- static-call SqlFaker\Sqlite\SqliteProvider::expr() packages/sql-faker/src/Sqlite/SqliteProvider.php:254
- static-call SqlFaker\Sqlite\SqliteProvider::term() packages/sql-faker/src/Sqlite/SqliteProvider.php:270
- static-call SqlFaker\Sqlite\SqliteProvider::whereClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:285
- static-call SqlFaker\Sqlite\SqliteProvider::orderByClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:300
- static-call SqlFaker\Sqlite\SqliteProvider::limitClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:315
- static-call SqlFaker\Sqlite\SqliteProvider::groupByClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:330
- static-call SqlFaker\Sqlite\SqliteProvider::havingClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:345
- static-call SqlFaker\Sqlite\SqliteProvider::fullname() packages/sql-faker/src/Sqlite/SqliteProvider.php:361
- static-call SqlFaker\Sqlite\SqliteProvider::withClause() packages/sql-faker/src/Sqlite/SqliteProvider.php:376
- static-call SqlFaker\Sqlite\SqliteProvider::foreignKeyConstraint() packages/sql-faker/src/Sqlite/SqliteProvider.php:394
- static-call SqlFaker\Sqlite\SqliteProvider::identifier() packages/sql-faker/src/Sqlite/SqliteProvider.php:410
- static-call SqlFaker\Sqlite\SqliteProvider::quotedIdentifier() packages/sql-faker/src/Sqlite/SqliteProvider.php:426
- static-call SqlFaker\Sqlite\SqliteProvider::stringLiteral() packages/sql-faker/src/Sqlite/SqliteProvider.php:442
- static-call SqlFaker\Sqlite\SqliteProvider::integerLiteral() packages/sql-faker/src/Sqlite/SqliteProvider.php:456
- static-call SqlFaker\Sqlite\SqliteProvider::decimalLiteral() packages/sql-faker/src/Sqlite/SqliteProvider.php:472
- static-call SqlFaker\Sqlite\SqliteProvider::insertFunctionUpsertStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:490
- static-call SqlFaker\Sqlite\SqliteProvider::multiDmlStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:508
- static-call SqlFaker\Sqlite\SqliteProvider::fullTextSearchStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:530
- static-call SqlFaker\Sqlite\SqliteProvider::temporaryTableStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:548
- static-call SqlFaker\Sqlite\SqliteProvider::viewStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:566
- static-call SqlFaker\Sqlite\SqliteProvider::generatedColumnStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:583
- static-call SqlFaker\Sqlite\SqliteProvider::foreignKeyCascadeStatement() packages/sql-faker/src/Sqlite/SqliteProvider.php:600