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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjsonApiCommonSyntaxWithCache(String input, String pathSpec) @Nullable BooleanjsonExists(String input, String pathSpec) @Nullable BooleanjsonExists(String input, String pathSpec, SqlJsonExistsErrorBehavior errorBehavior) @Nullable BooleanjsonExists(JsonFunctions.JsonPathContext context) @Nullable BooleanjsonExists(JsonFunctions.JsonPathContext context, SqlJsonExistsErrorBehavior errorBehavior) @Nullable BooleanjsonExists(JsonFunctions.JsonValueContext input, String pathSpec) @Nullable BooleanjsonExists(JsonFunctions.JsonValueContext input, String pathSpec, SqlJsonExistsErrorBehavior errorBehavior) @Nullable ObjectjsonQuery(String input, String pathSpec, SqlJsonQueryWrapperBehavior wrapperBehavior, SqlJsonQueryEmptyOrErrorBehavior emptyBehavior, SqlJsonQueryEmptyOrErrorBehavior errorBehavior, boolean jsonize) @Nullable ObjectjsonQuery(JsonFunctions.JsonPathContext context, SqlJsonQueryWrapperBehavior wrapperBehavior, SqlJsonQueryEmptyOrErrorBehavior emptyBehavior, SqlJsonQueryEmptyOrErrorBehavior errorBehavior, boolean jsonize) @Nullable ObjectjsonQuery(JsonFunctions.JsonValueContext input, String pathSpec, SqlJsonQueryWrapperBehavior wrapperBehavior, SqlJsonQueryEmptyOrErrorBehavior emptyBehavior, SqlJsonQueryEmptyOrErrorBehavior errorBehavior, boolean jsonize) @Nullable ObjectjsonValue(String input, String pathSpec, SqlJsonValueEmptyOrErrorBehavior emptyBehavior, Object defaultValueOnEmpty, SqlJsonValueEmptyOrErrorBehavior errorBehavior, Object defaultValueOnError) @Nullable ObjectjsonValue(JsonFunctions.JsonPathContext context, SqlJsonValueEmptyOrErrorBehavior emptyBehavior, Object defaultValueOnEmpty, SqlJsonValueEmptyOrErrorBehavior errorBehavior, Object defaultValueOnError) @Nullable ObjectjsonValue(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)
-