trinity.buffer.reader.sql_reader module#

Reader of the SQL buffer.

class trinity.buffer.reader.sql_reader.SQLReader(config: StorageConfig)[source]#

Bases: BufferReader

Reader of the SQL buffer.

__init__(config: StorageConfig) None[source]#
read(batch_size: int | None = None) List[source]#

Read from buffer.

async read_async(batch_size: int | None = None) List[source]#

Read from buffer asynchronously.

state_dict() Dict[source]#

Return the state of the reader as a dict. :returns: A dict containing the reader state. At minimum, it should contain

the current_index field.

load_state_dict(state_dict)[source]#