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
GenerationPlansTest::testQuotedIdentifierPlansThatLexemecovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 28
- function-call
compactline 28
public static function stringLiteral(int $minLength, int $maxLength): GenerationPlan<true>Parameters
$minLength | int | |
$maxLength | int |
Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testStringLiteralPlansThatLexemecovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 36
- function-call
compactline 36
public static function integerLiteral(int $min, int $max): GenerationPlan<true>Parameters
$min | int | |
$max | int |
Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testIntegerLiteralPlansThatLexemecovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 44
- function-call
compactline 44
public static function decimalLiteral(int $precision, int $scale): GenerationPlan<true>Parameters
$precision | int | |
$scale | int |
Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testDecimalLiteralPlansThatLexemecovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 52
- function-call
compactline 52
public static function floatLiteral(
int $precision,
int $scale,
int $minExponent,
int $maxExponent,
): GenerationPlan<true>Parameters
$precision | int | |
$scale | int | |
$minExponent | int | |
$maxExponent | int |
Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testFloatLiteralPlansThatLexemecovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 64
- function-call
compactline 66
public static function hexLiteral(int $minLength, int $maxLength): GenerationPlan<true>Parameters
$minLength | int | |
$maxLength | int |
Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testHexLiteralPlansThatLexemecovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 75
- function-call
compactline 75
public static function binaryLiteral(int $minLength, int $maxLength): GenerationPlan<true>Parameters
$minLength | int | |
$maxLength | int |
Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testBinaryLiteralPlansThatLexemecovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 83
- function-call
compactline 83
public static function dollarQuotedString(int $minLength, int $maxLength): GenerationPlan<true>Parameters
$minLength | int | |
$maxLength | int |
Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testDollarQuotedStringPlansThatLexemecovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 91
- function-call
compactline 91
public static function parameterMarker(int $min, int $max): GenerationPlan<true>Parameters
$min | int | |
$max | int |
Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testParameterMarkerPlansThatLexemecovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::lexical() line 99
- function-call
compactline 99
public static function insertFunctionUpsertStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 3
- static-call GenerationPlan::constrained() line 107
- static-call ProductionPattern::exactly() line 108
- static-call ProductionPattern::containing() line 111
public static function temporaryTableStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 2
- static-call GenerationPlan::constrained() line 141
- static-call ProductionPattern::containing() line 142
public static function viewStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testViewStatementStartsFromTheViewGrammarcovers and calls
Called from 1
Calls 1
- static-call GenerationPlan::fromRule() line 151
public static function generatedColumnStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 4
- static-call GenerationPlan::constrained() line 159
- static-call ProductionPattern::containing() line 160
- static-call ProductionPattern::nonEmpty() line 161
- static-call ProductionPattern::exactly() line 162
public static function foreignKeyCascadeStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 4
- static-call GenerationPlan::constrained() line 177
- static-call ProductionPattern::containing() line 178
- static-call ProductionPattern::nonEmpty() line 179
- static-call ProductionPattern::exactly() line 180
public static function partitionOfStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testPartitionOfStatementRequiresARangeBoundcovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::constrained() line 195
- static-call ProductionPattern::containing() line 196
public static function tableSampleStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 2
Called from 1
Calls 4
- static-call GenerationPlan::constrained() line 206
- static-call ProductionPattern::exactly() line 207
- static-call ProductionPattern::containing() line 210
- static-call ProductionPattern::nonEmpty() line 212
public static function doStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testDoStatementRequiresASingleStringBlockcovers and calls
Called from 1
Calls 2
- static-call GenerationPlan::constrained() line 225
- static-call ProductionPattern::exactly() line 226
public static function mergeStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testMergeStatementRequiresAllMutationBranchescovers and calls
Called from 1
Calls 3
- static-call GenerationPlan::constrained() line 236
- static-call ProductionPattern::exactly() line 238
- static-call ProductionPattern::containing() line 244
public static function copyStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
GenerationPlansTest::testCopyStatementStartsFromTheCopyGrammarcovers and calls
Called from 1
Calls 1
- static-call GenerationPlan::fromRule() line 257
public static function partialIndexUpsertStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 4
- static-call GenerationPlan::constrained() line 265
- static-call ProductionPattern::exactly() line 266
- static-call ProductionPattern::containing() line 269
- static-call ProductionPattern::nonEmpty() line 272
public static function domainDmlStatements(): non-empty-list<GenerationPlan<true>>Returns
non-empty-list<GenerationPlan<true>>Test cases 1
GenerationPlansTest::testDomainDmlStatementsCoverAllMutationGrammarscovers and calls
Called from 1
Calls 3
- function-call
array_mapline 281 - static-call GenerationPlan::constrained() line 282
- static-call ProductionPattern::exactly() line 283
public static function fullTextSearchStatement(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 4
- static-call GenerationPlan::constrained() line 294
- static-call ProductionPattern::exactly() line 295
- static-call ProductionPattern::containing() line 298
- static-call ProductionPattern::nonEmpty() line 300
public static function foreignKeyConstraint(): GenerationPlan<true>Returns
GenerationPlan<true>Test cases 1
Called from 1
Calls 3
- static-call GenerationPlan::constrained() line 341
- static-call ProductionPattern::containing() line 342
- static-call ProductionPattern::nonEmpty() line 344
public static function statementOfType(
Generator $faker,
?StatementRule $type,
int $maxDepth,
): GenerationPlan<true>Selects a statement type when omitted and bounds its generation plan.
Parameters
$faker | Generator | |
$type | ?StatementRule | |
$maxDepth | int |
Returns
GenerationPlan<true>Test cases 2
Called from 1
Calls 3
- method-call
Generator::randomElement()line 357 - static-call StatementRule::cases() line 357
- static-call GenerationPlan::statement() line 360
Test cases 27§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 26
GenerationPlansTest::testBinaryLiteralPlansThatLexemecovers and callsGenerationPlansTest::testCopyStatementStartsFromTheCopyGrammarcovers and callsGenerationPlansTest::testDecimalLiteralPlansThatLexemecovers and callsGenerationPlansTest::testDollarQuotedStringPlansThatLexemecovers and callsGenerationPlansTest::testDomainDmlStatementsCoverAllMutationGrammarscovers and callsGenerationPlansTest::testDoStatementRequiresASingleStringBlockcovers and callsGenerationPlansTest::testFloatLiteralPlansThatLexemecovers and callsGenerationPlansTest::testForeignKeyCascadeStatementRequiresBothCascadeActionscovers and callsGenerationPlansTest::testForeignKeyConstraintRestrictsTheTableConstraintGrammarcovers and callsGenerationPlansTest::testFullTextSearchStatementRequiresTheMatchOperatorcovers and callsGenerationPlansTest::testGeneratedColumnStatementRequiresTheGeneratedConstraintcovers and callsGenerationPlansTest::testHexLiteralPlansThatLexemecovers and callsGenerationPlansTest::testInsertFunctionUpsertStatementRestrictsTheConflictFunctionGrammarcovers and callsGenerationPlansTest::testIntegerLiteralPlansThatLexemecovers and callsGenerationPlansTest::testMergeStatementRequiresAllMutationBranchescovers and callsGenerationPlansTest::testParameterMarkerPlansThatLexemecovers and callsGenerationPlansTest::testPartialIndexUpsertStatementRequiresAConflictPredicatecovers and callsGenerationPlansTest::testPartitionOfStatementRequiresARangeBoundcovers and callsGenerationPlansTest::testQuotedIdentifierPlansThatLexemecovers and callsGenerationPlansTest::testStatementOfTypePreservesAnExplicitTypeWithoutConsumingRandomnesscovers and callsGenerationPlansTest::testStatementOfTypeUsesTheSeededFakerChoiceWhenNoTypeIsSpecifiedcovers and callsGenerationPlansTest::testStringLiteralPlansThatLexemecovers and callsGenerationPlansTest::testTableSampleStatementKeepsTheConstraintBeyondTheFirstOccurrencecovers and callsGenerationPlansTest::testTableSampleStatementRequiresASamplingClausecovers and callsGenerationPlansTest::testTemporaryTableStatementRequiresTheTemporaryProductioncovers and callsGenerationPlansTest::testViewStatementStartsFromTheViewGrammarcovers and calls
Other tests reaching this symbol 1
PostgreSqlProviderTestcalls
Relations§
Static calls 24
- static-call SqlFaker\PostgreSqlProvider::sql() packages/sql-faker/src/PostgreSqlProvider.php:110
- static-call SqlFaker\PostgreSqlProvider::copyStatement() packages/sql-faker/src/PostgreSqlProvider.php:328
- static-call SqlFaker\PostgreSqlProvider::foreignKeyConstraint() packages/sql-faker/src/PostgreSqlProvider.php:577
- static-call SqlFaker\PostgreSqlProvider::quotedIdentifier() packages/sql-faker/src/PostgreSqlProvider.php:613
- static-call SqlFaker\PostgreSqlProvider::stringLiteral() packages/sql-faker/src/PostgreSqlProvider.php:631
- static-call SqlFaker\PostgreSqlProvider::integerLiteral() packages/sql-faker/src/PostgreSqlProvider.php:647
- static-call SqlFaker\PostgreSqlProvider::decimalLiteral() packages/sql-faker/src/PostgreSqlProvider.php:665
- static-call SqlFaker\PostgreSqlProvider::floatLiteral() packages/sql-faker/src/PostgreSqlProvider.php:684
- static-call SqlFaker\PostgreSqlProvider::hexLiteral() packages/sql-faker/src/PostgreSqlProvider.php:703
- static-call SqlFaker\PostgreSqlProvider::binaryLiteral() packages/sql-faker/src/PostgreSqlProvider.php:721
- static-call SqlFaker\PostgreSqlProvider::dollarQuotedString() packages/sql-faker/src/PostgreSqlProvider.php:739
- static-call SqlFaker\PostgreSqlProvider::parameterMarker() packages/sql-faker/src/PostgreSqlProvider.php:755
- static-call SqlFaker\PostgreSqlProvider::insertFunctionUpsertStatement() packages/sql-faker/src/PostgreSqlProvider.php:773
- static-call SqlFaker\PostgreSqlProvider::partialIndexUpsertStatement() packages/sql-faker/src/PostgreSqlProvider.php:792
- static-call SqlFaker\PostgreSqlProvider::domainDmlStatement() packages/sql-faker/src/PostgreSqlProvider.php:813
- static-call SqlFaker\PostgreSqlProvider::fullTextSearchStatement() packages/sql-faker/src/PostgreSqlProvider.php:832
- static-call SqlFaker\PostgreSqlProvider::temporaryTableStatement() packages/sql-faker/src/PostgreSqlProvider.php:850
- static-call SqlFaker\PostgreSqlProvider::viewStatement() packages/sql-faker/src/PostgreSqlProvider.php:868
- static-call SqlFaker\PostgreSqlProvider::generatedColumnStatement() packages/sql-faker/src/PostgreSqlProvider.php:885
- static-call SqlFaker\PostgreSqlProvider::foreignKeyCascadeStatement() packages/sql-faker/src/PostgreSqlProvider.php:902
- static-call SqlFaker\PostgreSqlProvider::partitionOfStatement() packages/sql-faker/src/PostgreSqlProvider.php:919
- static-call SqlFaker\PostgreSqlProvider::tableSampleStatement() packages/sql-faker/src/PostgreSqlProvider.php:936
- static-call SqlFaker\PostgreSqlProvider::doStatement() packages/sql-faker/src/PostgreSqlProvider.php:953
- static-call SqlFaker\PostgreSqlProvider::mergeStatement() packages/sql-faker/src/PostgreSqlProvider.php:970