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.

Reading an option of the old syntaxdoctest
$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(): string

Answers the name of the generic option the keyword sets.

Returns

string
Calls 4
public function render(Output $out): void

Writes the keyword.

Parameters

$outOutput
Calls 1

Test 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
Type declarations 1