final class JsonUniqueKeys
    implements Clause
    uses Snapshot
Public API: explicitly declared with @visibility public.

WITH UNIQUE [KEYS] or WITHOUT UNIQUE [KEYS]: whether duplicate object keys are rejected.

The optional KEYS word is noise. Source: https://www.postgresql.org/docs/17/functions-json.html#FUNCTIONS-JSON-CREATION-TABLE, https://www.postgresql.org/docs/17/functions-json.html#FUNCTIONS-SQLJSON-MISC.

Reading a uniqueness requirementdoctest
(new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\JsonUniqueKeys(true))->unique // => true

Properties§

public bool $unique

Methods§

public function __construct(public bool $unique)

Parameters

$uniqueboolWhether WITH UNIQUE is written, rather than WITHOUT UNIQUE
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives nothing: the clause holds no expression.

Parameters

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

Writes the clause.

Parameters

$outOutput
Test cases 1
Calls 1

Test cases 9§

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

Dedicated tests 2
Other tests reaching this symbol 7

Relations§

Instantiated in 1
Type declarations 6