trinity.buffer.writer.sql_writer module#

Writer of the SQL buffer.

class trinity.buffer.writer.sql_writer.SQLWriter(config: StorageConfig)[源代码]#

基类:BufferWriter

Writer of the SQL buffer.

__init__(config: StorageConfig) None[源代码]#
write(data: list) None[源代码]#

Write to buffer.

async write_async(data)[源代码]#

Write to buffer asynchronously.

async acquire() int[源代码]#

Acquire the buffer writer.

返回:

The reference count of the buffer after acquiring.

返回类型:

int

async release() int[源代码]#

Release the buffer writer. After release, the buffer writer can not be used again.

返回:

The reference count of the buffer after releasing.

返回类型:

int