enumJsonItemKind
enum JsonItemKind: string
Public API: explicitly declared with
@visibility public.The kinds of JSON item an IS JSON predicate tests for, as PostgreSQL's JsonValueType distinguishes them.
Source: https://www.postgresql.org/docs/17/functions-json.html#FUNCTIONS-SQLJSON-MISC.
$query = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze("SELECT '[]' IS JSON ARRAY");
$query->field(0)->expression->kind // => \SqlSemantics\Platform\PostgreSql\Statement\Expression\Predicate\JsonItemKind::JsonArrayCases§
case Json = 'JSON'JSON: any JSON value.
case JsonValue = 'JSON VALUE'JSON VALUE: any JSON value, written explicitly.
case JsonArray = 'JSON ARRAY'JSON ARRAY.
case JsonObject = 'JSON OBJECT'JSON OBJECT.
case JsonScalar = 'JSON SCALAR'JSON SCALAR.
Test cases 11§
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 10
PredicateRuleTest::testJsonLowersTheItemKindcallsPrecedenceTest::testTakesUniquenessFindsAnOpenJsonTestOnTheRightEdgecallsJsonTestTest::testDeriveScalarIsBooleanForAStringcallsJsonTestTest::testDeriveScalarReportsAnIntegercallsJsonTestTest::testRejectsANegationcallsJsonTestTest::testRenderWritesTheKindcallsJsonObjectAggregateTest::testRejectsAValueThatWouldTakeTheUniquenesscallsJsonObjectConstructorTest::testRejectsALastValueThatWouldTakeTheUniquenesscallsJsonParseTest::testRejectsAValueThatWouldTakeTheUniquenesscallsJsonQueryFunctionTest::testRejectsAPathThatWouldTakeTheWrappercalls
Relations§
Constant reads 5
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Expression\PredicateRule packages/sql-semantics-postgres/src/Lowering/Expression/PredicateRule.php:92
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Expression\PredicateRule packages/sql-semantics-postgres/src/Lowering/Expression/PredicateRule.php:92
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Expression\PredicateRule packages/sql-semantics-postgres/src/Lowering/Expression/PredicateRule.php:93
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Expression\PredicateRule packages/sql-semantics-postgres/src/Lowering/Expression/PredicateRule.php:93
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Expression\PredicateRule packages/sql-semantics-postgres/src/Lowering/Expression/PredicateRule.php:94