ReadAheadCursor Reference

class pyqldb.cursor.read_ahead_cursor.ReadAheadCursor(statement_result, session, transaction_id, read_ahead, executor)[source]

An iterable class representing a read ahead cursor on a statement’s result set. This class will create a queue of size read_ahead and fetch results asynchronously to fill the queue.

  • statement_result (dict) – The initial result set data dictionary of the statement execution.

  • session (pyqldb.communication.session_client.SessionClient) – The parent session that represents the communication channel to QLDB.

  • transaction_id (str) – The ID of this cursor’s parent transaction, required to fetch pages.

  • read_ahead (int) – The number of pages to read-ahead and buffer in this cursor.

  • executor (concurrent.futures.thread.ThreadPoolExecutor) – The optional executor for asynchronous retrieval. If none specified, a new thread is created.