nectarchain.dqm.db_utils.DQMDB#

class DQMDB(read_only=True)[source]#

Bases: object

ZEO-backed object database client for DQM data persistence.

Initialise a connection to the ZEO database server.

Parameters:
read_onlybool, optional

Whether the connection should be opened in read-only mode.

Methods

abort_and_close

Abort the current transaction and close the database connection.

commit_and_close

Commit the current transaction and close the database connection.

insert

Insert a value into the database under the given key.

abort_and_close()[source]#

Abort the current transaction and close the database connection.

commit_and_close()[source]#

Commit the current transaction and close the database connection.

insert(key=None, value=None)[source]#

Insert a value into the database under the given key.

Parameters:
keystr, optional

The key under which to store the data.

valuedict, optional

The data to store (converted to an OOBTree).

Returns:
bool

True if the insert succeeded, False otherwise.