enumCopyFlag
enum CopyFlag: string
implements Node
Public API: explicitly declared with
@visibility public.An option of the old COPY syntax written as one keyword: BINARY, FREEZE, CSV or HEADER.
PostgreSQL turns each into a generic option: BINARY and CSV set format, FREEZE sets freeze, HEADER sets header. Source: https://www.postgresql.org/docs/17/sql-copy.html#id-1.9.3.55.10.
$copy = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('COPY t TO STDOUT WITH CSV HEADER');
[$copy->statement->legacy[1]->option(), $copy->toString()] // => ['header', 'COPY t TO STDOUT CSV HEADER']Cases§
case Binary = 'BINARY'case Freeze = 'FREEZE'case Csv = 'CSV'case Header = 'HEADER'Methods§
public function option(): stringAnswers the name of the generic option the keyword sets.
Returns
stringCalls 4
- class-const CopyFlag::Binary() line 35
- class-const CopyFlag::Csv() line 35
- class-const CopyFlag::Freeze() line 36
- class-const CopyFlag::Header() line 37
public function render(Output $out): voidTest cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Relations§
Constant reads 6
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CopyOptionRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CopyOptionRule.php:43
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CopyOptionRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CopyOptionRule.php:44
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CopyOptionRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CopyOptionRule.php:45
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\CopyOptionRule packages/sql-semantics-postgres/src/Lowering/Manipulation/CopyOptionRule.php:46
- class-const SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Copy\CopyQuery::__construct() packages/sql-semantics-postgres/src/Statement/Manipulation/Copy/CopyQuery.php:59
- class-const SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Copy\CopyTable::__construct() packages/sql-semantics-postgres/src/Statement/Manipulation/Copy/CopyTable.php:85