Class SnapshotQuery

All Implemented Interfaces:
RemoteQuery<List<Result>>, Serializable

public class SnapshotQuery
extends ContextAwareRemoteQuery<List<Result>>

This class is a simple query that just evaluates a Groovy/Python expression, then returns a list of Result objects. The given expression must evaluate to a Table, Integer, or list/array of Table/Integer objects. Each Result will then be either a QueryResult containing a snapshotted remote table handle, or an integer representing an update count. This is intended to correspond to the result types in an SQL data source (a ResultSet or update count).

Snapshotting the tables preserves consistency as the client requests rows from each table in subsequent requests (see TableRowRangeSnapshotFunction).Note this does not guarantee consistency between the tables since we do not wrap this whole thing in an LTM lock.

See Also:
Serialized Form
  • Constructor Details

    • SnapshotQuery

      public SnapshotQuery​(String query, int sessionId, Object[] parameters, int maxRows, boolean escapeProcessingEnabled, String bindParameterMode)
  • Method Details

    • execute

      public List<Result> execute​(Database db)
      Description copied from interface: RemoteQuery
      Execute a query on a remote host.
      Parameters:
      db - database to use for execution.
      Returns:
      result of the query.