Interface ParameterScope

All Known Implementing Classes:
ParameterSession

public interface ParameterScope
A universe for a single export of a ParameterizedQuery
  • Method Details

    • getLong

      @ScriptApi long getLong(@NotNull String name) throws ParameterException
      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

      @ScriptApi long[] getLongSet(@NotNull String name) throws ParameterException
      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

      @ScriptApi double getDouble(@NotNull String name) throws ParameterException
      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

      @ScriptApi double[] getDoubleSet(@NotNull String name) throws ParameterException
      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

      @ScriptApi String getString(@NotNull String name) throws ParameterException
      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

      @ScriptApi String[] getStringSet(@NotNull String name) throws ParameterException
      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

      @ScriptApi DBDateTime getDateTime(@NotNull String name) throws ParameterException
      Get the named parameter as a DBDateTime
      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

      @ScriptApi DBDateTime[] getDateTimeSet(@NotNull String name) throws ParameterException
      Get the named parameter as an array of DBDateTimes
      Parameters:
      name - the name of the parameter
      Returns:
      the value as an array of DBDateTimes
      Throws:
      ParameterException - if the parameter did not exist.
    • getBoolean

      @ScriptApi boolean getBoolean(@NotNull String name) throws ParameterException
      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

      @ScriptApi boolean isPresent(@NotNull String name)
      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

      @ScriptApi PermissionFilterProvider getPermissionFilterProvider()
      Gets the PermissionFilterProvider associated with the user running the ParameterizedQuery.
      Returns:
      The PermissionFilterProvider.
    • getUserContext

      @ScriptApi UserContext getUserContext()
      Gets the UserContext, which has the authenticated and effective user ids.
      Returns:
      UserContext for the parameterized query.
    • getAuthenticatedUser

      @ScriptApi String getAuthenticatedUser()
      Convenience method to return the authenticated user of the UserContext directly.
      Returns:
      The authenticated user
    • getEffectiveUser

      @ScriptApi String getEffectiveUser()
      Convenience method to return the effective user of the UserContext directly.
      Returns:
      The authenticated user
    • fetchTableIntraday

      Table fetchTableIntraday(Database database, String namespace, String tableName)
      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 as db.
      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

      Table fetchTableHistorical(Database database, String namespace, String tableName)
      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 as db.
      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

      @ScriptApi <T> void setResult(@NotNull String name, T value)
      Set the value of a named result.
      Type Parameters:
      T - the type.
      Parameters:
      name - the name of the result
      value - the value to set it to.