Package org.apache.calcite.runtime
Class JsonFunctions.StatefulFunction
java.lang.Object
org.apache.calcite.runtime.JsonFunctions.StatefulFunction
- Enclosing class:
JsonFunctions
State for
JSON_EXISTS
, JSON_VALUE
, JSON_QUERY
.
Marked deterministic so that the code generator instantiates one once per query, not once per row.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjsonApiCommonSyntaxWithCache
(String input, String pathSpec) @Nullable Boolean
jsonExists
(String input, String pathSpec) @Nullable Boolean
jsonExists
(String input, String pathSpec, SqlJsonExistsErrorBehavior errorBehavior) @Nullable Boolean
jsonExists
(JsonFunctions.JsonPathContext context) @Nullable Boolean
jsonExists
(JsonFunctions.JsonPathContext context, SqlJsonExistsErrorBehavior errorBehavior) @Nullable Boolean
jsonExists
(JsonFunctions.JsonValueContext input, String pathSpec) @Nullable Boolean
jsonExists
(JsonFunctions.JsonValueContext input, String pathSpec, SqlJsonExistsErrorBehavior errorBehavior) @Nullable Object
jsonQuery
(String input, String pathSpec, SqlJsonQueryWrapperBehavior wrapperBehavior, SqlJsonQueryEmptyOrErrorBehavior emptyBehavior, SqlJsonQueryEmptyOrErrorBehavior errorBehavior, boolean jsonize) @Nullable Object
jsonQuery
(JsonFunctions.JsonPathContext context, SqlJsonQueryWrapperBehavior wrapperBehavior, SqlJsonQueryEmptyOrErrorBehavior emptyBehavior, SqlJsonQueryEmptyOrErrorBehavior errorBehavior, boolean jsonize) @Nullable Object
jsonQuery
(JsonFunctions.JsonValueContext input, String pathSpec, SqlJsonQueryWrapperBehavior wrapperBehavior, SqlJsonQueryEmptyOrErrorBehavior emptyBehavior, SqlJsonQueryEmptyOrErrorBehavior errorBehavior, boolean jsonize) @Nullable Object
jsonValue
(String input, String pathSpec, SqlJsonValueEmptyOrErrorBehavior emptyBehavior, Object defaultValueOnEmpty, SqlJsonValueEmptyOrErrorBehavior errorBehavior, Object defaultValueOnError) @Nullable Object
jsonValue
(JsonFunctions.JsonPathContext context, SqlJsonValueEmptyOrErrorBehavior emptyBehavior, Object defaultValueOnEmpty, SqlJsonValueEmptyOrErrorBehavior errorBehavior, Object defaultValueOnError) @Nullable Object
jsonValue
(JsonFunctions.JsonValueContext input, String pathSpec, SqlJsonValueEmptyOrErrorBehavior emptyBehavior, Object defaultValueOnEmpty, SqlJsonValueEmptyOrErrorBehavior errorBehavior, Object defaultValueOnError)
-
Constructor Details
-
StatefulFunction
public StatefulFunction()
-
-
Method Details
-
jsonApiCommonSyntaxWithCache
-
jsonExists
-
jsonExists
public @Nullable Boolean jsonExists(String input, String pathSpec, SqlJsonExistsErrorBehavior errorBehavior) -
jsonExists
-
jsonExists
public @Nullable Boolean jsonExists(JsonFunctions.JsonValueContext input, String pathSpec, SqlJsonExistsErrorBehavior errorBehavior) -
jsonExists
-
jsonExists
public @Nullable Boolean jsonExists(JsonFunctions.JsonPathContext context, SqlJsonExistsErrorBehavior errorBehavior) -
jsonValue
public @Nullable Object jsonValue(String input, String pathSpec, SqlJsonValueEmptyOrErrorBehavior emptyBehavior, Object defaultValueOnEmpty, SqlJsonValueEmptyOrErrorBehavior errorBehavior, Object defaultValueOnError) -
jsonValue
public @Nullable Object jsonValue(JsonFunctions.JsonValueContext input, String pathSpec, SqlJsonValueEmptyOrErrorBehavior emptyBehavior, Object defaultValueOnEmpty, SqlJsonValueEmptyOrErrorBehavior errorBehavior, Object defaultValueOnError) -
jsonValue
public @Nullable Object jsonValue(JsonFunctions.JsonPathContext context, SqlJsonValueEmptyOrErrorBehavior emptyBehavior, Object defaultValueOnEmpty, SqlJsonValueEmptyOrErrorBehavior errorBehavior, Object defaultValueOnError) -
jsonQuery
public @Nullable Object jsonQuery(String input, String pathSpec, SqlJsonQueryWrapperBehavior wrapperBehavior, SqlJsonQueryEmptyOrErrorBehavior emptyBehavior, SqlJsonQueryEmptyOrErrorBehavior errorBehavior, boolean jsonize) -
jsonQuery
public @Nullable Object jsonQuery(JsonFunctions.JsonValueContext input, String pathSpec, SqlJsonQueryWrapperBehavior wrapperBehavior, SqlJsonQueryEmptyOrErrorBehavior emptyBehavior, SqlJsonQueryEmptyOrErrorBehavior errorBehavior, boolean jsonize) -
jsonQuery
public @Nullable Object jsonQuery(JsonFunctions.JsonPathContext context, SqlJsonQueryWrapperBehavior wrapperBehavior, SqlJsonQueryEmptyOrErrorBehavior emptyBehavior, SqlJsonQueryEmptyOrErrorBehavior errorBehavior, boolean jsonize)
-