classPlanPrinter
final class PlanPrinter
Writes a plan back out in the syntax PlanParser reads.
Relations that share a left end, an operator and its optional markers are printed as one grouped statement, which is how they would most likely have been written by hand.
Methods§
public function print(FixturePlan $plan): stringFormats .
Parameters
$plan | FixturePlan |
Returns
stringTest cases 9
PlanPrinterTest::readingBackWhatWasPrintedGivesTheSameTextcallsPlanPrinterTest::testAStandaloneTableIsWrittenOutAlongsideTheRelationscallsPlanPrinterTest::testDoesNotGroupRelationsWithDifferentOperatorscallsPlanPrinterTest::testDoesNotGroupRelationsWithDifferentOptionalMarkerscallsPlanPrinterTest::testPrintsARelationWithSpacesAroundTheOperatorcallsPlanPrinterTest::testPrintsATableOnlyPlanAsItsTableNamecallsPlanPrinterTest::testPrintsOptionalMarkersOnTheSideTheyBelongTocallsPlanPrinterTest::testRegroupsRelationsThatShareALeftEndcallsPlanPrinterTest::testSeveralStandaloneTablesKeepTheOrderTheyWereNamedIncalls
Called from 1
Calls 7
- method-call RelationGroups::group() line 23
- new RelationGroups line 23
- method-call StatementPrinter::printGroup() line 24
- new StatementPrinter line 24
- method-call PlanTables::standaloneTables() line 27
- new PlanTables line 27
- function-call
implodeline 31
public function printRelation(Relation $relation): stringWrite a single relation, without needing a plan to hold it.
Parameters
$relation | Relation |
Returns
stringTest cases 2
Called from 1
Calls 2
- method-call StatementPrinter::printGroup() line 39
- new StatementPrinter line 39
Test cases 41§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 11
PlanPrinterTest::readingBackWhatWasPrintedGivesTheSameTextcallsPlanPrinterTest::testAStandaloneTableIsWrittenOutAlongsideTheRelationscallsPlanPrinterTest::testDoesNotGroupRelationsWithDifferentOperatorscallsPlanPrinterTest::testDoesNotGroupRelationsWithDifferentOptionalMarkerscallsPlanPrinterTest::testPrintRelationIncludesOptionalEndpointMarkerscallsPlanPrinterTest::testPrintsARelationWithSpacesAroundTheOperatorcallsPlanPrinterTest::testPrintsASingleRelationWithoutAPlancallsPlanPrinterTest::testPrintsATableOnlyPlanAsItsTableNamecallsPlanPrinterTest::testPrintsOptionalMarkersOnTheSideTheyBelongTocallsPlanPrinterTest::testRegroupsRelationsThatShareALeftEndcallsPlanPrinterTest::testSeveralStandaloneTablesKeepTheOrderTheyWereNamedIncalls
Other tests reaching this symbol 30
PostgreSqlEndToEndTestcallsSqliteIntegrationTestcallsConnectedTablesTestcallsOverrideSpecsTestcallsRelationCountsTestcallsRelationProjectionTestcallsRowMaterializerTestcallsGenerationRunTestcallsPlanGeneratorTestcallsPlanSchemaExceptionTestcallsPlanSchemaValidatorTestcallsEndpointValidatorTestcallsFixtureProviderTestcallsConstructorHydrationTestcallsPropertyHydrationTestcallsColumnRefTestcallsFixturePlanTestcallsPlanStatementsTestcallsRelationCursorTestcallsRelationReaderTestcallsPlanParserTestcallsPlanStructureExceptionTestcallsPlanSyntaxExceptionTestcallsPlanTablesTestcallsRelationGroupsTestcallsStatementPrinterTestcallsRelationTestcallsPlanValidationTestcallsTableNameTestcallsSqlSchemaProviderTestcalls