Package io.deephaven.query.parameterized
Interface ParameterScope
- All Known Implementing Classes:
ParameterSession
public interface ParameterScope
A universe for a single export of a
ParameterizedQuery
-
Method Summary
Modifier and TypeMethodDescriptionfetchTableHistorical
(Database database, String namespace, String tableName) Retrieve a historical table from within the willDo scope of a ParameterizedQuery.fetchTableIntraday
(Database database, String namespace, String tableName) Retrieve an intraday table from within the willDo scope of a ParameterizedQuery.Convenience method to return the authenticated user of the UserContext directly.boolean
getBoolean
(String name) Get the named parameter as a booleangetDateTime
(String name) Get the named parameter as aDBDateTime
getDateTimeSet
(String name) Get the named parameter as an array ofDBDateTime
sdouble
Get the named parameter as a doubledouble[]
getDoubleSet
(String name) Get the named parameter as an array of doublesConvenience method to return the effective user of the UserContext directly.long
Get the named parameter as a longlong[]
getLongSet
(String name) Get the named parameter as an array of longsGets the PermissionFilterProvider associated with the user running the ParameterizedQuery.Get the named parameter as a StringString[]
getStringSet
(String name) Get the named parameter as an array of StringsGets the UserContext, which has the authenticated and effective user ids.boolean
Check if the specified parameter has been assigned a value.<T> void
Set the value of a named result.
-
Method Details
-
getLong
Get the named parameter as a long- Parameters:
name
- the name of the parameter- Returns:
- the value of the named parameter as a long.
- Throws:
ParameterException
- if the parameter did not exist.
-
getLongSet
Get the named parameter as an array of longs- Parameters:
name
- the name of the parameter- Returns:
- the value as an array of longs
- Throws:
ParameterException
- if the parameter did not exist.
-
getDouble
Get the named parameter as a double- Parameters:
name
- the name of the parameter- Returns:
- the value of the named parameter as a double.
- Throws:
ParameterException
- if the parameter did not exist.
-
getDoubleSet
Get the named parameter as an array of doubles- Parameters:
name
- the name of the parameter- Returns:
- the value as an array of doubles
- Throws:
ParameterException
- if the parameter did not exist.
-
getString
Get the named parameter as a String- Parameters:
name
- the name of the parameter- Returns:
- the value of the named parameter as an int.
- Throws:
ParameterException
- if the parameter did not exist.
-
getStringSet
Get the named parameter as an array of Strings- Parameters:
name
- the name of the parameter- Returns:
- the value as an array of Strings
- Throws:
ParameterException
- if the parameter did not exist.
-
getDateTime
Get the named parameter as aDBDateTime
- Parameters:
name
- the name of the parameter- Returns:
- the value of the named parameter as a
DBDateTime
. - Throws:
ParameterException
- if the parameter did not exist.
-
getDateTimeSet
Get the named parameter as an array ofDBDateTime
s- Parameters:
name
- the name of the parameter- Returns:
- the value as an array of
DBDateTime
s - Throws:
ParameterException
- if the parameter did not exist.
-
getBoolean
Get the named parameter as a boolean- Parameters:
name
- the name of the parameter- Returns:
- the value of the named parameter as an boolean.
- Throws:
ParameterException
- if the parameter did not exist.
-
isPresent
Check if the specified parameter has been assigned a value.- Parameters:
name
- the parameter name- Returns:
- true if the parameter has been given a value, false otherwise.
-
getPermissionFilterProvider
Gets the PermissionFilterProvider associated with the user running the ParameterizedQuery.- Returns:
- The PermissionFilterProvider.
-
getUserContext
Gets the UserContext, which has the authenticated and effective user ids.- Returns:
- UserContext for the parameterized query.
-
getAuthenticatedUser
Convenience method to return the authenticated user of the UserContext directly.- Returns:
- The authenticated user
-
getEffectiveUser
Convenience method to return the effective user of the UserContext directly.- Returns:
- The authenticated user
-
fetchTableIntraday
Retrieve an intraday table from within the willDo scope of a ParameterizedQuery. The table is retrieved from the underlying data store with the UserContext of the query’s owner. After the owner’s row and column ACL application, the executing user’s context are applied. This results in the resulting table having only data that both the query’s owner and the executing user may see.- Parameters:
database
- The database of a Deephaven console session, exposed asdb
.namespace
- The namespace of the table to be retrieved.tableName
- The name of the table to be retrieved.- Returns:
- The intraday table subject to ACL constraints described above.
-
fetchTableHistorical
Retrieve a historical table from within the willDo scope of a ParameterizedQuery. The table is retrieved from the underlying data store with the UserContext of the query’s owner. After the owner’s row and column ACL application, the executing user’s context are applied. This results in the resulting table having only data that both the query’s owner and the executing user may see.- Parameters:
database
- The database of a Deephaven console session, exposed asdb
.namespace
- The namespace of the table to be retrieved.tableName
- The name of the table to be retrieved.- Returns:
- The historical table subject to ACL constraints described above.
-
setResult
Set the value of a named result.- Type Parameters:
T
- the type.- Parameters:
name
- the name of the resultvalue
- the value to set it to.
-