classDual
final class Dual
implements Relation
uses Snapshot
Public API: explicitly declared with
@visibility public.FROM DUAL: the dummy table of one row and no columns.
Rule: MYSQL-DUAL-001. The shape is complete and empty; no name refers to it. Source: https://dev.mysql.com/doc/refman/8.4/en/select.html ("DUAL is purely for the convenience of people who require that all SELECT statements should have FROM"). Status: Implemented.
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT 1 FROM DUAL');
$query->statement->from instanceof \SqlSemantics\Platform\MySql\Statement\Relation\Dual // => trueMethods§
public function deriveRelation(Derivation $derivation, Environment $environment): RelationFactAnswers the empty row.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
Calls 2
- new RelationFact line 36
- new RowShape line 36
public function render(Output $out): voidTest cases 28§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 27
ChainTest::testQueryKeepsTheOwnClausesOfAMiddleSelectInALeadingUnioncallsChainTest::testQueryOrdersAUnionAfterTheClausesOfItsLastBlockcallsBlockTest::testFinishKeepsALaterOrderingAfterTheLockingClausesAsTheBlocksOwncallsBlockTest::testSelectRejectsTwoIntoClausescallsCommonTablesTest::testAnchoredBindsTheColumnsOfTheNonrecursivePartcallsCommonTablesTest::testExtendedAddsTablesWithoutAQueryLevelcallsCommonTablesTest::testPendingFindsTheRecursiveTableARightOperandRefersTocallsJoinedInputTest::testCompleteTellsWhetherEveryColumnIsKnowncallsJoinedInputTest::testCompleteTreatsANameThatDependsOnInputsAsUndecidedcallsJoinedInputTest::testOfAnswersTheShapeTheStarSelectscallsJoinedInputTest::testSlotAnswersTheSlotOfAnEntrycallsJoiningTest::testExtendMakesEveryColumnNullablecallsProjectionTest::testAdmitsMatchesTheCorrelationOrTableNamecallsProjectionTest::testFieldReferencesTheSlotOfTheRelationcallsProjectionTest::testMissingCollectsTheMissingInputscallsTailFactsTest::testDeriveReportsAnUnknownLockedTablecallsLeadingUnionTest::testRenderNeedsALastOperandWithOnlyItsOwnLimitOrLockingcallsLeadingUnionTest::testRenderNeedsMySql5ForTheFormAndMySql56ForAnOwnLimitcallsOrderedSetOperationTest::testDeriveQueryNeedsMySql56callsOrderedSetOperationTest::testRejectsAsAnOperandOfAnotherSetOperationcallsIndexHintTest::testAnotherIndexValueIsRejectedcallsJoinedTableTest::testACommaListAsAnOperandIsRejectedcallsJoinedTableTest::testAConditionOnANaturalJoinIsRejectedcallsJoinedTableTest::testAJoinOnTheRightOfANaturalJoinIsRejectedcallsJoinedTableTest::testBothConditionsAreRejectedcallsTableListTest::testAListOfOneMemberIsRejectedcallsTableListTest::testANestedListIsRejectedcalls