enumJsonEncoding
enum JsonEncoding: string
Public API: explicitly declared with
@visibility public.A character encoding named in FORMAT JSON ENCODING.
Source: https://www.postgresql.org/docs/17/functions-json.html#FUNCTIONS-JSON-CREATION-TABLE.
\SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\JsonEncoding::named('UTF8') // => \SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\JsonEncoding::Utf8Cases§
case Utf8 = 'utf8'case Utf16 = 'utf16'case Utf32 = 'utf32'Methods§
public static function named(string $name): ?selfAnswers the encoding a name selects, compared without case as the server does; null for any other name.
Parameters
$name | string |
Returns
?selfTest cases 1
Called from 3
- static-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonRule::encoding() packages/sql-semantics-postgres/src/Lowering/Invocation/JsonRule.php:285
- static-call SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\JsonFormat::__construct() packages/sql-semantics-postgres/src/Statement/Invocation/Json/JsonFormat.php:38
- static-call SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\JsonFormat::encoding() packages/sql-semantics-postgres/src/Statement/Invocation/Json/JsonFormat.php:46
Calls 2
- static-call JsonEncoding::tryFrom() line 27
- function-call
strtolowerline 27
Test cases 3§
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 2
Relations§
Static calls 3
- static-call SqlSemantics\Platform\PostgreSql\Lowering\Invocation\JsonRule::encoding() packages/sql-semantics-postgres/src/Lowering/Invocation/JsonRule.php:285
- static-call SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\JsonFormat::__construct() packages/sql-semantics-postgres/src/Statement/Invocation/Json/JsonFormat.php:38
- static-call SqlSemantics\Platform\PostgreSql\Statement\Invocation\Json\JsonFormat::encoding() packages/sql-semantics-postgres/src/Statement/Invocation/Json/JsonFormat.php:46