packages/sql-semantics-mysql/src/Statement/Dml/Handler/KeyComparison.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Platform\MySql\Statement\Dml\Handler;
6
7/**
8 * How HANDLER ... READ index compares the index key with the given values to find the first row.
9 *
10 * Each case holds the operator it is written with.
11 * Source: https://dev.mysql.com/doc/refman/8.4/en/handler.html.
12 *
13 * @visibility public
14 * @example Reading the operator of a case
15 * \SqlSemantics\Platform\MySql\Statement\Dml\Handler\KeyComparison::GreaterOrEqual->value // => '>='
16 */
17enum KeyComparison: string
18{
19 case Equal = '=';
20 case GreaterOrEqual = '>=';
21 case LessOrEqual = '<=';
22 case Greater = '>';
23 case Less = '<';
24}
25