classCopyRule
final class CopyRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
Lowers COPY.
Rule: PG-COPY-LOWER-001. Scope: CopyStmt, copy_from, copy_file_name, copy_delimiter, opt_using, opt_program, opt_binary; the options follow PG-COPY-OPTION-LOWER-001. Constructors: CopyTable, CopyQuery, CopyDirection, CopyStream. USING before DELIMITERS and WITH before the options are noise words. Source: https://www.postgresql.org/docs/17/sql-copy.html. Status: Implemented.
Methods§
Lowers CopyStmt.
Parameters
$statement | Node |
Throws
ImplementationGap When the production has no rule, or the statement copied is not a queryCalled from 1
Calls 12
- new CopyOptionRule line 48
- static-call ImplementationGap::rule() line 52
- method-call CopyOptionRule::options() line 54
- new CopyQuery line 56
- method-call CopyRule::flag() line 56
- method-call CopyRule::file() line 56
- static-call ImplementationGap::production() line 59
- new CopyTable line 63
- new TargetTable line 65
- new RelationReference line 65
- method-call CopyRule::direction() line 67
- method-call CopyRule::delimiters() line 70
public function direction(Node $direction): CopyDirectionLowers copy_from.
Parameters
$direction | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 3
- class-const CopyDirection::From() line 87
- class-const CopyDirection::To() line 88
- static-call ImplementationGap::production() line 89
public function flag(Node $flag): boolLowers opt_binary or opt_program: whether the keyword is written.
Parameters
$flag | Node |
Returns
boolThrows
ImplementationGap When the production has no ruleCalled from 3
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CopyRule::copy() packages/sql-semantics-postgres/src/Lowering/Manipulation/CopyRule.php:56
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CopyRule::copy() packages/sql-semantics-postgres/src/Lowering/Manipulation/CopyRule.php:64
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CopyRule::copy() packages/sql-semantics-postgres/src/Lowering/Manipulation/CopyRule.php:68
Calls 1
- static-call ImplementationGap::production() line 105
public function file(Node $file): StringConstant|CopyStreamLowers copy_file_name.
Parameters
$file | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CopyRule::copy() packages/sql-semantics-postgres/src/Lowering/Manipulation/CopyRule.php:56
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CopyRule::copy() packages/sql-semantics-postgres/src/Lowering/Manipulation/CopyRule.php:69
Calls 3
- class-const CopyStream::Stdin() line 120
- class-const CopyStream::Stdout() line 121
- static-call ImplementationGap::production() line 122
public function delimiters(Node $clause): ?StringConstantLowers copy_delimiter: the string of DELIMITERS, or null.
Parameters
$clause | Node |
Returns
Throws
ImplementationGap When the production has no ruleCalled from 1
Calls 1
- static-call ImplementationGap::production() line 138
Private surface 1§
Implementation details, listed for orientation only.
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
CopyRuleTestcalls