enumRelationKind
enum RelationKind: string
The relationship operators of DBML, whose values are the operators themselves.
Many-to-many has no operator here. DBML spells it <> and invents a junction table to draw it with, but a fixture has to put rows in that junction table, so it must be named. Writing the two halves separately says the same thing without hiding the table that carries the data.
Cases§
case OneToMany = '<'The left side is the one, the right side is the many.
case ManyToOne = '>'The left side is the many, the right side is the one.
case OneToOne = '-'Methods§
public function parentSide(): RelationSideThe end that holds a single row, and is generated first.
Returns
Called from 3
Calls 5
- class-const RelationKind::OneToMany() line 35
- class-const RelationKind::OneToOne() line 35
- class-const RelationSide::Left() line 35
- class-const RelationKind::ManyToOne() line 36
- class-const RelationSide::Right() line 36
public function childSide(): RelationSideThe end that references the parent, and may hold several rows.
Returns
Called from 2
Calls 1
- method-call RelationKind::parentSide() line 45
public function childIsCollection(): boolWhether the child end holds a list of rows rather than a single row.
Returns
boolCalled from 1
Calls 1
- class-const RelationKind::OneToOne() line 53
Test cases 51§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
RelationKindTest::testChildIsCollectionOnlyOneToOneHoldsASingleChildRowcallsRelationKindTest::testChildSideManyToOnePutsTheParentOnTheRightcallsRelationKindTest::testEachCaseIsSpeltAsItsDbmlOperatorcallsRelationKindTest::testManyToManyIsNotAnOperatorcallsRelationKindTest::testOneToOnePutsTheParentOnTheLeftcallsRelationKindTest::testParentSideOneToManyPutsTheParentOnTheLeftcalls
Other tests reaching this symbol 45
PostgreSqlEndToEndTestcallsSqliteIntegrationTestcallsConnectedTablesTestcallsOverrideSpecsTestcallsRelationCountsTestcallsRelationProjectionTestcallsRowMaterializerTestcallsGenerationRunTestcallsPlanGeneratorTestcallsPlanSchemaExceptionTestcallsPlanSchemaValidatorTestcallsEndpointValidatorTestcallsFixtureProviderTestcallsConstructorHydrationTestcallsPropertyHydrationTestcallsColumnRefTestcallsFixturePlanTestcallsPlanStatementsTestcallsRelationCursorTest::testReadOperatorConsumesDirectioncallsRelationReaderTest::testBuildRelationsCarriesOptionalityToEachTargetcallsPlanParserTest::testReadsAManyToOneRelationcallsPlanParserTest::testReadsAOneToManyRelationcallsPlanParserTest::testReadsAOneToOneRelationcallsPlanPrinterTestcallsPlanStructureExceptionTestcallsPlanSyntaxExceptionTestcallsPlanTablesTestcallsRelationGroupsTest::testOperatorPreservesBothMarkerscallsStatementPrinterTestcallsRelationTest::testASelfReferenceNamesItsTableOncecallsRelationTest::testBothSidesAreRequiredByDefaultcallsRelationTest::testChildIsCollectionOnlyOneToOneHoldsASingleChildRowcallsRelationTest::testChildIsOptionalAMarkerNextToTheChildMakesTheChildOptionalcallsRelationTest::testColumnMapPairsCompositeKeysPositionallycallsRelationTest::testColumnMapPointsChildColumnsAtParentColumnscallsRelationTest::testColumnMapReadsTheSameWrittenEitherWaycallsRelationTest::testKeepsTheSidesInTheOrderTheyWereWrittencallsRelationTest::testManyToOneDescribesTheSameShapeWrittenBackwardscallsRelationTest::testNamedConstructorsBuildEachOperatorcallsRelationTest::testOneToManyMakesTheLeftSideTheParentcallsRelationTest::testParentIsOptionalAMarkerNextToTheParentMakesTheParentOptionalcallsRelationTest::testTablesListsBothEndscallsPlanValidationTestcallsTableNameTestcallsSqlSchemaProviderTestcalls
Relations§
Static calls 1
Method calls 5
- method-call SqlFixture\Plan\Relation::parent() packages/sql-fixture/src/Plan/Relation.php:112
- method-call SqlFixture\Plan\Relation::child() packages/sql-fixture/src/Plan/Relation.php:120
- method-call SqlFixture\Plan\Relation::parentIsOptional() packages/sql-fixture/src/Plan/Relation.php:128
- method-call SqlFixture\Plan\Relation::childIsOptional() packages/sql-fixture/src/Plan/Relation.php:139
- method-call SqlFixture\Plan\Relation::childIsCollection() packages/sql-fixture/src/Plan/Relation.php:147