enumComparisonOperator
enum ComparisonOperator: string
Public API: explicitly declared with
@visibility public.The comparison operators of MySQL.
!= is the operator <>. <=> is the NULL-safe equality, which never yields NULL. Source: https://dev.mysql.com/doc/refman/8.4/en/comparison-operators.html.
$query = (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT a FROM t WHERE a != 1');
$query->statement->where->operator // => \SqlSemantics\Platform\MySql\Statement\Expression\ComparisonOperator::NotEqualCases§
case Equal = '='case NullSafeEqual = '<=>'case NotEqual = '<>'case Less = '<'case LessOrEqual = '<='case Greater = '>'case GreaterOrEqual = '>='Test cases 21§
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 20
ConditionRuleTest::testApplyLowersAQuantifiedComparisoncallsConditionRuleTest::testBooleanLowersAChainOfNullTestsAndComparisonscallsConditionRuleTest::testOperatorLowersTheComparisonOperatorscallsFlowRuleTest::testChoiceLowersASearchedCasecallsFlowRuleTest::testConditionalLowersTheBranchesAndTheElsecallsFlowRuleTest::testJumpLowersReturnLeaveAndIteratecallsFlowRuleTest::testLoopLowersLoopWhileAndRepeatcallsPrecedenceTest::testAdmitsAcceptsTheNonterminalsOfASlotcallsComparisonTest::testAComparisonAsRightOperandIsRejectedcallsComparisonTest::testAVariableAssignmentAsLeftOperandIsRejectedcallsComparisonTest::testDeriveScalarNeverYieldsNullForTheNullSafeEqualitycallsComparisonTest::testRenderKeepsTheLeftAssociationOfAChaincallsComparisonTest::testRenderSpellsTheNotEqualOperatorInItsStandardFormcallsNotTest::testRenderNegatesAComparisonWithoutParenthesescallsIntervalAdditionTest::testRenderLetsTheOperandExtendOverAComparisoncallsInListTest::testAComparisonOperandIsRejectedcallsInQueryTest::testAComparisonOperandIsRejectedcallsQuantifiedComparisonTest::testATruthTestOperandIsRejectedcallsTruthTestTest::testRenderWritesTheNegatedTestcallsSelectTest::testRenderBuildsSqlFromAnExplicitStructurecalls
Relations§
Constant reads 9
- class-const SqlSemantics\Platform\MySql\Lowering\Expression\ConditionRule packages/sql-semantics-mysql/src/Lowering/Expression/ConditionRule.php:70
- class-const SqlSemantics\Platform\MySql\Lowering\Expression\ConditionRule packages/sql-semantics-mysql/src/Lowering/Expression/ConditionRule.php:70
- class-const SqlSemantics\Platform\MySql\Lowering\Expression\ConditionRule packages/sql-semantics-mysql/src/Lowering/Expression/ConditionRule.php:70
- class-const SqlSemantics\Platform\MySql\Lowering\Expression\ConditionRule packages/sql-semantics-mysql/src/Lowering/Expression/ConditionRule.php:71
- class-const SqlSemantics\Platform\MySql\Lowering\Expression\ConditionRule packages/sql-semantics-mysql/src/Lowering/Expression/ConditionRule.php:71
- class-const SqlSemantics\Platform\MySql\Lowering\Expression\ConditionRule packages/sql-semantics-mysql/src/Lowering/Expression/ConditionRule.php:71
- class-const SqlSemantics\Platform\MySql\Lowering\Expression\ConditionRule packages/sql-semantics-mysql/src/Lowering/Expression/ConditionRule.php:72
- class-const SqlSemantics\Platform\MySql\Lowering\Expression\ConditionRule::apply() packages/sql-semantics-mysql/src/Lowering/Expression/ConditionRule.php:173
- class-const SqlSemantics\Platform\MySql\Statement\Expression\Comparison::deriveScalar() packages/sql-semantics-mysql/src/Statement/Expression/Comparison.php:66
Type declarations 3
- type SqlSemantics\Platform\MySql\Lowering\Expression\ConditionRule packages/sql-semantics-mysql/src/Lowering/Expression/ConditionRule.php:196
- type SqlSemantics\Platform\MySql\Statement\Expression\Comparison packages/sql-semantics-mysql/src/Statement/Expression/Comparison.php:49
- type SqlSemantics\Platform\MySql\Statement\Expression\Subquery\QuantifiedComparison packages/sql-semantics-mysql/src/Statement/Expression/Subquery/QuantifiedComparison.php:48