trinity.buffer.reader.sql_reader module#

Reader of the SQL buffer.

class trinity.buffer.reader.sql_reader.SQLReader(config: StorageConfig)[源代码]#

基类:BufferReader

Reader of the SQL buffer.

__init__(config: StorageConfig) None[源代码]#
read(batch_size: int | None = None, **kwargs) List[源代码]#

Read from buffer.

async read_async(batch_size: int | None = None, **kwargs) List[源代码]#

Read from buffer asynchronously.

state_dict() Dict[源代码]#

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)[源代码]#