classLeaves
final class Leaves
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
The operand leaves one lowering created from source tokens.
Names, literals and parameters are recorded when they are lowered. After the statement is built, every recorded leaf must be reachable in it, so a rule cannot read an operand and then drop it. The record lives for one analysis and is not part of the published model.
Methods§
public function record<T of object>(T $value): TRecords a leaf value and returns it.
Parameters
$value | T |
Returns
TTest cases 5
LeavesTest::testAllAnswersEveryRecordedLeafInOrdercallsLeavesTest::testRecordReturnsTheValueItselfcallsLeafEmbeddingTest::testDroppedAnswersTheFirstLeafTheStructureLostcallsLeafEmbeddingTest::testDroppedComparesByIdentityAndNotByValuecallsLeafEmbeddingTest::testDroppedIsNullWhenEveryLeafIsReachablecalls
public function all(): list<object>Answers every recorded leaf.
Returns
list<object>Test cases 4
Private surface 1§
Implementation details, listed for orientation only.
private list<object> $values = []Test cases 16§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 14
LoweringTest::testCommandLowersAQueryCommandAndADefinitionCommandcallsLoweringTest::testCommandUsesTheRuleObjectsOfTheSameLoweringcallsLoweringTest::testStatementsLowersEveryCommandInOrderAndSkipsEmptyOnescallsLoweringTest::testStatementsRecordsTheOperandLeavesItLowerscallsLoweringTest::testTerminatedAnswersNullForAnEmptyCommandcallsLoweringTest::testTerminatedWrapsAnExplainedCommandcallsLoweringTest::testUnwrappedAnswersTheCommandInsideTheGrammarWrappercallsQueryCommandsTest::testCommandAnswersNullForACommandOfAnotherFamilycallsLeafEmbeddingTest::testDroppedAnswersTheFirstLeafTheStructureLostcallsLeafEmbeddingTest::testDroppedComparesByIdentityAndNotByValuecallsLeafEmbeddingTest::testDroppedIsNullWhenEveryLeafIsReachablecallsValueGraphTest::testMembersRefusesAClassWithWritablePropertiescallsPlatformTest::testLowerAnswersTheStatementsOfATreeInOrdercallsPlatformTest::testLowerTurnsAParseTreeIntoStatementsAndRecordsTheLeavescalls
Relations§
Instantiated in 2
Method calls 1
Type declarations 3
- type SqlSemantics\Platform\Sqlite\Lowering\Lowering packages/sql-semantics-sqlite/src/Lowering/Lowering.php:132
- type SqlSemantics\Platform\Sqlite\Model\Validation\LeafEmbedding packages/sql-semantics-sqlite/src/Model/Validation/LeafEmbedding.php:24
- type SqlSemantics\Platform\Sqlite\Platform packages/sql-semantics-sqlite/src/Platform.php:93