classFlags
final class Flags
Lowers the optional keywords several families share.
Rule: PG-FLAG-001. Scope: opt_or_replace, opt_concurrently, opt_with, opt_as, opt_table, opt_column, opt_default, opt_nowait, opt_procedural, opt_set_data, opt_drop_behavior, add_drop, document_or_content, unicode_normal_form. A flag is whether its keywords are written; a choice is an enum case. The noise words among them (opt_with, opt_as, opt_table, opt_column, opt_procedural, opt_set_data) are listed with their citations in the leaf noise table, and a command does not keep them. Source: the synopsis of each command in https://www.postgresql.org/docs/17/sql-commands.html. Status: Implemented.
Methods§
public function present(Node $flag): boolTells whether an optional keyword is written: opt_or_replace, opt_concurrently, opt_with, opt_as, opt_table, opt_column, opt_default, opt_nowait, opt_procedural or opt_set_data.
Parameters
$flag | Node |
Returns
boolThrows
ImplementationGap When the production has no ruleCalls 2
- class-const Flags::PRESENT() line 64
- static-call ImplementationGap::production() line 64
public function dropBehavior(Node $behavior): ?DropBehaviorLowers opt_drop_behavior; no keyword is null.
Parameters
$behavior | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalls 3
- class-const DropBehavior::Cascade() line 77
- class-const DropBehavior::Restrict() line 78
- static-call ImplementationGap::production() line 80
Lowers add_drop.
Parameters
$choice | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalls 3
- class-const AddOrDrop::Add() line 94
- class-const AddOrDrop::Drop() line 95
- static-call ImplementationGap::production() line 96
Lowers document_or_content.
Parameters
$option | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalls 3
- class-const XmlOption::Document() line 110
- class-const XmlOption::Content() line 111
- static-call ImplementationGap::production() line 112
public function normalForm(Node $form): NormalFormLowers unicode_normal_form.
Parameters
$form | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalls 5
- class-const NormalForm::Nfc() line 126
- class-const NormalForm::Nfd() line 127
- class-const NormalForm::Nfkc() line 128
- class-const NormalForm::Nfkd() line 129
- static-call ImplementationGap::production() line 130
Private surface 2§
Implementation details, listed for orientation only.
private const PRESENT = ['opt_or_replace: OR REPLACE' => true, 'opt_or_replace:' => false, 'opt_concurr…private Lowering $loweringTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
FlagsTestcalls