Class QueryScope.SynchronizedScriptSessionImpl
java.lang.Object
com.illumon.iris.db.tables.select.QueryScope
com.illumon.iris.db.tables.select.QueryScope.SynchronizedScriptSessionImpl
- All Implemented Interfaces:
com.fishlib.base.log.LogOutputAppendable
- Enclosing class:
- QueryScope
-
Nested Class Summary
Nested classes/interfaces inherited from class com.illumon.iris.db.tables.select.QueryScope
QueryScope.MissingVariableException, QueryScope.StandaloneImpl, QueryScope.SynchronizedScriptSessionImpl, QueryScope.UnsynchronizedScriptSessionImpl
-
Field Summary
Fields inherited from class com.illumon.iris.db.tables.select.QueryScope
CLIENT_HOST_PARAM_NAME, QUERY_NAME_PARAM_NAME
-
Method Summary
Modifier and TypeMethodDescriptionprotected <T> Param<T>
createParam
(String name) Get a Param by name.Get a snapshot of local values for remote parameters, for scopes that support this.Get all known scope variable names.boolean
hasParamName
(String name) Check if the scope has the given name.void
putObjectFields
(Object object) Add an object's public members (referenced reflectively, not a shallow copy!) to this scope if supported.<T> void
Add a parameter to the scope.void
putRemoteParams
(Map<String, Class> remoteParamMetadata) Add remote parameter metadata, for scopes that support this.<T> T
readParamValue
(String name) Get the value of a given scope parameter by name.<T> T
readParamValue
(String name, T defaultValue) Get the value of a given scope parameter by name.Methods inherited from class com.illumon.iris.db.tables.select.QueryScope
addObjectFields, addParam, append, getClientHost, getDefaultInstance, getParams, getParamValue, getQueryName, makeScriptSessionImpl, setClientHost, setDefaultInstance, setQueryName
-
Method Details
-
getParamNames
Description copied from class:QueryScope
Get all known scope variable names.- Specified by:
getParamNames
in classQueryScope
- Returns:
- A collection of scope variable names.
-
hasParamName
Description copied from class:QueryScope
Check if the scope has the given name.- Specified by:
hasParamName
in classQueryScope
- Parameters:
name
- param name- Returns:
- True iff the scope has the given param name
-
createParam
Description copied from class:QueryScope
Get a Param by name.- Specified by:
createParam
in classQueryScope
- Parameters:
name
- parameter name- Returns:
- newly-constructed Param (name + value-snapshot pair).
- Throws:
QueryScope.MissingVariableException
- If any of the named scope variables does not exist.
-
readParamValue
Description copied from class:QueryScope
Get the value of a given scope parameter by name.- Specified by:
readParamValue
in classQueryScope
- Parameters:
name
- parameter name.- Returns:
- parameter value.
- Throws:
QueryScope.MissingVariableException
- If no such scope parameter exists.
-
readParamValue
Description copied from class:QueryScope
Get the value of a given scope parameter by name.- Specified by:
readParamValue
in classQueryScope
- Parameters:
name
- parameter name.defaultValue
- default parameter value.- Returns:
- parameter value, or the default parameter value, if the value is not present.
-
putParam
Description copied from class:QueryScope
Add a parameter to the scope.- Specified by:
putParam
in classQueryScope
- Parameters:
name
- parameter name.value
- parameter value.
-
putRemoteParams
Description copied from class:QueryScope
Add remote parameter metadata, for scopes that support this. Note: This is an optional method.- Specified by:
putRemoteParams
in classQueryScope
- Parameters:
remoteParamMetadata
- remote parameter metadata.
-
getLocalValuesForRemoteParams
Description copied from class:QueryScope
Get a snapshot of local values for remote parameters, for scopes that support this. Note: This is an optional method.- Specified by:
getLocalValuesForRemoteParams
in classQueryScope
- Returns:
- A map from name to the current local value for all remote params.
-
putObjectFields
Description copied from class:QueryScope
Add an object's public members (referenced reflectively, not a shallow copy!) to this scope if supported. Note: This is an optional method.- Specified by:
putObjectFields
in classQueryScope
- Parameters:
object
- object to add public members from.
-