classTextRule
final class TextRule
Lowers EXTRACT, OVERLAY, POSITION, SUBSTRING and TRIM with their keyword-separated operands.
Rule: PG-TEXT-LOWERING-001. Scope: the EXTRACT, OVERLAY, POSITION, SUBSTRING and TRIM productions of func_expr_common_subexpr, extract_list, extract_arg, overlay_list, position_list, substr_list, trim_list. Constructors: Extract, Overlay, Position, Substring, SimilarSubstring, Trim, and KeywordCall for SUBSTRING and OVERLAY with plain arguments. BOTH in TRIM, and FROM in TRIM without characters, are the defaults and noise (see InvocationNoise). Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/functions-string.html, https://www.postgresql.org/docs/17/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT. Status: Implemented.
Methods§
Lowers an EXTRACT, OVERLAY, POSITION, SUBSTRING or TRIM production of func_expr_common_subexpr.
Parameters
$form | Form |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 12
- class-const TextRule::SIDES() line 77
- method-call TextRule::trim() line 78
- method-call Form::node() line 78
- function-call
countline 78 - method-call TextRule::extract() line 82
- method-call TextRule::overlay() line 83
- new KeywordCall line 84
- class-const KeywordFunction::Overlay() line 84
- method-call TextRule::position() line 85
- method-call TextRule::substring() line 86
- class-const KeywordFunction::Substring() line 87
- static-call ImplementationGap::production() line 88
Lowers extract_list with its extract_arg.
Parameters
$list | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 3
- static-call ImplementationGap::production() line 101
- class-const TextRule::UNITS() line 104
- new Extract line 110
Lowers overlay_list.
Parameters
$list | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 2
- static-call ImplementationGap::production() line 125
- new Overlay line 128
Lowers position_list.
Parameters
$list | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 2
- static-call ImplementationGap::production() line 140
- new Position line 143
Lowers substr_list.
Parameters
$list | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 3
- new Substring line 157
- new SimilarSubstring line 161
- static-call ImplementationGap::production() line 162
Lowers trim_list for a side.
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 2
- new Trim line 177
- static-call ImplementationGap::production() line 180
Private surface 3§
Implementation details, listed for orientation only.
private const SIDES = ['func_expr_common_subexpr: TRIM ( BOTH trim_list )' => \SqlSemantics\Platform\…private const UNITS = ['extract_arg: YEAR_P' => \SqlSemantics\Platform\PostgreSql\Statement\Invocatio…private Lowering $loweringTest cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.