classSublinkRule
final class SublinkRule
Lowers the productions of a_expr that compare a value with a query or a list.
Rule: PG-EXPRESSION-SUBLINK-001. Scope: a_expr [NOT] IN in_expr, a_expr subquery_Op sub_type select_with_parens, a_expr subquery_Op sub_type ( a_expr ), UNIQUE opt_unique_null_treatment select_with_parens, and in_expr, sub_type, subquery_Op. Constructors: InList, InSubquery, QuantifiedSubquery, QuantifiedArray, UniquePredicate. The query in the parentheses is lowered by the query family without those parentheses. Termination: each operand is a strictly smaller subtree. Source: https://www.postgresql.org/docs/17/functions-subquery.html, https://www.postgresql.org/docs/17/functions-comparisons.html. Status: Implemented.
Methods§
Lowers a comparison with a query or a list, or answers null when the production is not one.
Parameters
$form | Form |
Returns
Test cases 1
Called from 1
Calls 7
- method-call SublinkRule::membership() line 66
- method-call Form::node() line 66
- new QuantifiedSubquery line 68
- method-call SublinkRule::comparator() line 70
- method-call SublinkRule::quantifier() line 71
- new QuantifiedArray line 74
- new UniquePredicate line 80
Lowers the right side of IN: in_expr.
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Expression\SublinkRule::lower() packages/sql-semantics-postgres/src/Lowering/Expression/SublinkRule.php:66
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Expression\SublinkRule::lower() packages/sql-semantics-postgres/src/Lowering/Expression/SublinkRule.php:67
Calls 3
- new InSubquery line 98
- new InList line 99
- static-call ImplementationGap::production() line 100
public function comparator(Node $operator): OperatorName|MatchKeywordLowers subquery_Op.
Parameters
$operator | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Expression\SublinkRule::lower() packages/sql-semantics-postgres/src/Lowering/Expression/SublinkRule.php:70
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Expression\SublinkRule::lower() packages/sql-semantics-postgres/src/Lowering/Expression/SublinkRule.php:76
Calls 2
- class-const SublinkRule::KEYWORDS() line 112
- static-call ImplementationGap::production() line 120
public function quantifier(Node $quantifier): QuantifierLowers sub_type.
Parameters
$quantifier | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Expression\SublinkRule::lower() packages/sql-semantics-postgres/src/Lowering/Expression/SublinkRule.php:71
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Expression\SublinkRule::lower() packages/sql-semantics-postgres/src/Lowering/Expression/SublinkRule.php:77
Calls 2
- class-const SublinkRule::QUANTIFIERS() line 133
- static-call ImplementationGap::production() line 133
Private surface 3§
Implementation details, listed for orientation only.
private const QUANTIFIERS = ['sub_type: ANY' => \SqlSemantics\Platform\PostgreSql\Statement\Expression\Subq…private const KEYWORDS = ['subquery_Op: LIKE' => \SqlSemantics\Platform\PostgreSql\Statement\Expression\…private Lowering $loweringTest cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.