final class CopyArguments
    implements OptionArgument
    uses Snapshot
Public API: explicitly declared with @visibility public.

A parenthesized list of words or strings as the argument of a COPY option, such as the columns of force_null.

Mirrors the List argument of a COPY DefElem. Source: https://www.postgresql.org/docs/17/sql-copy.html.

Reading a list argumentdoctest
$copy = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("COPY t FROM STDIN (format csv, force_null (a, 'b'))");
    count($copy->statement->options[1]->argument->items) // => 2
Refusing an empty listdoctest
new \SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Copy\CopyArguments([]) // throws \SqlSemantics\Platform\PostgreSql\Model\Diagnostic\InvalidConstruction

Properties§

public non-empty-list<Toggle|Word|StringConstant> $items

Methods§

public function __construct(list<OptionArgument> $items)

Parameters

$itemslist<OptionArgument>The items in written order: at least one word, string or boolean keyword

Throws

InvalidConstruction When there is no item, or an item is not a word, a string or a boolean keyword
Calls 5
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: the items are words and strings.

Parameters

$derivationDerivation
$environmentEnvironment
public function render(Output $out): void

Writes the parenthesized items.

Parameters

$outOutput
Calls 1

Test cases 2§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Type checks 2
Type declarations 1