Package org.apache.calcite.runtime
Class JsonFunctions
java.lang.Object
org.apache.calcite.runtime.JsonFunctions
A collection of functions used in JSON processing.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Used in the JsonModify function.static class
Returned path context of JsonApiCommonSyntax, public for testing.static class
The Java output ofSqlJsonValueExpressionOperator
.static enum
Path spec has two different modes: lax mode and strict mode.static class
State forJSON_EXISTS
,JSON_VALUE
,JSON_QUERY
. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Object
static @Nullable Boolean
isJsonArray
(@Nullable String input) static @Nullable Boolean
isJsonObject
(@Nullable String input) static @Nullable Boolean
isJsonScalar
(@Nullable String input) static @Nullable Boolean
isJsonValue
(@Nullable String input) jsonApiCommonSyntax
(String input) jsonApiCommonSyntax
(String input, String pathSpec) jsonApiCommonSyntax
(JsonFunctions.JsonValueContext input, String pathSpec) static String
jsonArray
(SqlJsonConstructorNullClause nullClause, @Nullable Object... elements) static void
jsonArrayAggAdd
(List list, @Nullable Object element, SqlJsonConstructorNullClause nullClause) static @Nullable Integer
static @Nullable Integer
static String
jsonInsert
(String jsonDoc, Object... kvs) static String
jsonInsert
(JsonFunctions.JsonValueContext input, Object... kvs) static String
static String
static String
static String
jsonKeys
(JsonFunctions.JsonPathContext context) static String
static String
jsonKeys
(JsonFunctions.JsonValueContext input, String pathSpec) static @Nullable Integer
jsonLength
(String input) static @Nullable Integer
jsonLength
(String input, String pathSpec) static @Nullable Integer
jsonLength
(JsonFunctions.JsonPathContext context) static @Nullable Integer
static @Nullable Integer
jsonLength
(JsonFunctions.JsonValueContext input, String pathSpec) static String
jsonObject
(SqlJsonConstructorNullClause nullClause, @Nullable Object... kvs) static void
jsonObjectAggAdd
(Map map, String k, @Nullable Object v, SqlJsonConstructorNullClause nullClause) static String
jsonPretty
(String input) static String
static String
jsonRemove
(String input, String... pathSpecs) static String
jsonRemove
(JsonFunctions.JsonValueContext input, String... pathSpecs) static String
jsonReplace
(String jsonDoc, Object... kvs) static String
jsonReplace
(JsonFunctions.JsonValueContext input, Object... kvs) static String
static String
jsonSet
(JsonFunctions.JsonValueContext input, Object... kvs) static Integer
jsonStorageSize
(String input) static Integer
static String
static String
jsonValueExpression
(String input)
-
Method Details
-
jsonize
-
dejsonize
-
jsonValueExpression
-
jsonApiCommonSyntax
-
jsonApiCommonSyntax
public static JsonFunctions.JsonPathContext jsonApiCommonSyntax(JsonFunctions.JsonValueContext input) -
jsonApiCommonSyntax
-
jsonApiCommonSyntax
public static JsonFunctions.JsonPathContext jsonApiCommonSyntax(JsonFunctions.JsonValueContext input, String pathSpec) -
jsonObject
-
jsonObjectAggAdd
public static void jsonObjectAggAdd(Map map, String k, @Nullable Object v, SqlJsonConstructorNullClause nullClause) -
jsonArray
public static String jsonArray(SqlJsonConstructorNullClause nullClause, @Nullable Object... elements) -
jsonArrayAggAdd
public static void jsonArrayAggAdd(List list, @Nullable Object element, SqlJsonConstructorNullClause nullClause) -
jsonPretty
-
jsonPretty
-
jsonType
-
jsonType
-
jsonDepth
-
jsonDepth
-
jsonLength
-
jsonLength
-
jsonLength
-
jsonLength
-
jsonLength
-
jsonKeys
-
jsonKeys
-
jsonKeys
-
jsonKeys
-
jsonKeys
-
jsonRemove
-
jsonRemove
-
jsonStorageSize
-
jsonStorageSize
-
jsonReplace
-
jsonReplace
-
jsonInsert
-
jsonInsert
-
jsonSet
-
jsonSet
-
isJsonValue
-
isJsonObject
-
isJsonArray
-
isJsonScalar
-