classJsonUniqueKeys
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.
(new \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\JsonUniqueKeys(true))->unique // => trueProperties§
public bool $uniqueMethods§
public function __construct(public bool $unique)Parameters
$unique | bool | Whether WITH UNIQUE is written, rather than WITHOUT UNIQUE |
public function deriveClause(Derivation $derivation, Environment $environment): voidDerives nothing: the clause holds no expression.
Parameters
$derivation | Derivation | |
$environment | Environment |
Test cases 1
public function render(Output $out): voidTest 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
PrecedenceTest::testTakesUniquenessFindsAnOpenJsonTestOnTheRightEdgecallsJsonObjectAggregateTest::testRejectsAValueThatWouldTakeTheUniquenesscallsJsonObjectAggregateTest::testRenderWritesTheClausesFilterAndWindowcallsJsonObjectConstructorTest::testRejectsALastValueThatWouldTakeTheUniquenesscallsJsonObjectConstructorTest::testRenderWritesTheClausescallsJsonParseTest::testRejectsAValueThatWouldTakeTheUniquenesscallsJsonParseTest::testRenderWritesTheUniquenesscalls
Relations§
Instantiated in 1
Type declarations 6
- type SqlSemantics\Platform\PostgreSql\Lowering\Invocation\Invocations packages/sql-semantics-postgres/src/Lowering/Invocation/Invocations.php:234
- type SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonRule packages/sql-semantics-postgres/src/Lowering/Invocation/JsonRule.php:331
- type SqlSemantics\Platform\PostgreSql\Statement\Expression\Predicate\JsonTest packages/sql-semantics-postgres/src/Statement/Expression/Predicate/JsonTest.php:48
- type SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\Constructor\JsonObjectAggregate packages/sql-semantics-postgres/src/Statement/Invocation/Json/Constructor/JsonObjectAggregate.php:56
- type SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\Constructor\JsonObjectConstructor packages/sql-semantics-postgres/src/Statement/Invocation/Json/Constructor/JsonObjectConstructor.php:56
- type SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\Constructor\JsonParse packages/sql-semantics-postgres/src/Statement/Invocation/Json/Constructor/JsonParse.php:44