enumJsonBehaviorKind
enum JsonBehaviorKind: string
Public API: explicitly declared with
@visibility public.What an SQL/JSON function returns when the path finds nothing or an error occurs.
Mirrors PostgreSQL's JsonBehaviorType; the bare EMPTY, which the server treats as EMPTY ARRAY, is a distinct spelling and kept. Source: https://www.postgresql.org/docs/17/functions-json.html#FUNCTIONS-SQLJSON-QUERYING.
\SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\Query\JsonBehaviorKind::EmptyObject->value // => 'EMPTY OBJECT'Cases§
case Error = 'ERROR'case Null = 'NULL'case True = 'TRUE'case False = 'FALSE'case Unknown = 'UNKNOWN'case EmptyArray = 'EMPTY ARRAY'case EmptyObject = 'EMPTY OBJECT'case Empty = 'EMPTY'case Default = 'DEFAULT'Test cases 10§
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 9
JsonChecksTest::testAcceptedFollowsTheFunctioncallsJsonChecksTest::testBehaviorsNamesTheColumncallsJsonBehaviorClauseTest::testDeriveClauseDerivesBothDefaultscallsJsonBehaviorClauseTest::testRenderWritesOnEmptyThenOnErrorcallsJsonBehaviorTest::testDeriveClauseDerivesTheDefaultcallsJsonBehaviorTest::testRejectsDefaultWithoutExpressioncallsJsonBehaviorTest::testRenderWritesTheKeywordscallsJsonQueryFunctionTest::testDeriveScalarReportsAnInvalidBehaviorcallsJsonQueryFunctionTest::testRenderWritesEveryClauseInOrdercalls
Relations§
Constant reads 10
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:69
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:70
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:71
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:72
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:73
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:74
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:75
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:76
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule::behavior() packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:188
- class-const SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\Query\JsonBehavior::__construct() packages/sql-semantics-postgres/src/Statement/Invocation/Json/Query/JsonBehavior.php:38
Type declarations 2
- type SqlSemantics\Platform\PostgreSql\Rules\Invocation\JsonChecks packages/sql-semantics-postgres/src/Rules/Invocation/JsonChecks.php:99
- type SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\Query\JsonBehavior packages/sql-semantics-postgres/src/Statement/Invocation/Json/Query/JsonBehavior.php:36