packages/sql-semantics-mysql/src/Statement/Expression/Subquery/Quantifier.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlSemantics\Platform\MySql\Statement\Expression\Subquery;
6
7/**
8 * The quantifier of a comparison with the rows of a subquery: ALL, or ANY (SOME is the same keyword).
9 *
10 * Each case holds the keyword.
11 * Source: https://dev.mysql.com/doc/refman/8.4/en/any-in-some-subqueries.html,
12 * https://dev.mysql.com/doc/refman/8.4/en/all-subqueries.html.
13 *
14 * @visibility public
15 * @example Writing SOME as ANY
16 * (new \SqlSemantics\Platform\MySql\Semantics())->analyze('SELECT a FROM t WHERE a > SOME (SELECT 1)')->statement->where->quantifier // => \SqlSemantics\Platform\MySql\Statement\Expression\Subquery\Quantifier::Any
17 */
18enum Quantifier: string
19{
20 case All = 'ALL';
21 case Any = 'ANY';
22}
23