enumJsonFunctionKind
enum JsonFunctionKind: string
Public API: explicitly declared with
@visibility public.The SQL/JSON query functions of PostgreSQL 17.
Mirrors PostgreSQL's JsonExprOp (without the JSON_TABLE operation, which is a relation). Source: https://www.postgresql.org/docs/17/functions-json.html#FUNCTIONS-SQLJSON-QUERYING.
\SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\Query\JsonFunctionKind::Value->builtin() // => \SqlSemantics\Platform\PostgreSql\Statement\Type\Descriptor\Builtin::TextCases§
case Exists = 'JSON_EXISTS'case Query = 'JSON_QUERY'case Value = 'JSON_VALUE'Methods§
public function builtin(): BuiltinAnswers the result type when no RETURNING clause is written.
Returns
Called from 1
Calls 6
- class-const JsonFunctionKind::Exists() line 32
- class-const Builtin::Bool() line 32
- class-const JsonFunctionKind::Query() line 33
- class-const Builtin::Jsonb() line 33
- class-const JsonFunctionKind::Value() line 34
- class-const Builtin::Text() line 34
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
JsonChecksTest::testAcceptedFollowsTheFunctioncallsJsonChecksTest::testBehaviorsNamesTheColumncallsJsonChecksTest::testQueryReportsFormatInReturningAndQuotesWithWrappercallsJsonQueryFunctionTest::testDeriveScalarIsTheReturningTypecallsJsonQueryFunctionTest::testDeriveScalarReportsAnInvalidBehaviorcallsJsonQueryFunctionTest::testOutputNameIsTheFunctioncallsJsonQueryFunctionTest::testRejectsAPathThatWouldTakeTheWrappercallsJsonQueryFunctionTest::testRejectsAWrapperOutsideJsonQuerycallsJsonQueryFunctionTest::testRejectsReturningOnJsonExistscallsJsonQueryFunctionTest::testRenderWritesEveryClauseInOrdercalls
Relations§
Method calls 1
Constant reads 9
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule::function() packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:100
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule::function() packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:110
- class-const SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonQueryRule::function() packages/sql-semantics-postgres/src/Lowering/Invocation/JsonQueryRule.php:120
- class-const SqlSemantics\Platform\PostgreSql\Rules\Invocation\JsonChecks::query() packages/sql-semantics-postgres/src/Rules/Invocation/JsonChecks.php:71
- class-const SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::typed() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:170
- class-const SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::typed() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:176
- class-const SqlSemantics\Platform\PostgreSql\Rules\Resolution\TableFunctionShapes::typed() packages/sql-semantics-postgres/src/Rules/Resolution/TableFunctionShapes.php:176
- class-const SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\Query\JsonQueryFunction::__construct() packages/sql-semantics-postgres/src/Statement/Invocation/Json/Query/JsonQueryFunction.php:73
- class-const SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\Query\JsonQueryFunction::__construct() packages/sql-semantics-postgres/src/Statement/Invocation/Json/Query/JsonQueryFunction.php:74
Type declarations 3
- type SqlSemantics\Platform\PostgreSql\Rules\Invocation\JsonChecks packages/sql-semantics-postgres/src/Rules/Invocation/JsonChecks.php:85
- 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\JsonQueryFunction packages/sql-semantics-postgres/src/Statement/Invocation/Json/Query/JsonQueryFunction.php:63