minos.plugins.lmdb.clients

This module contains the implementation of the lmdb client.

Classes

LmdbDatabaseClient

Lmdb Database Client class.

class LmdbDatabaseClient[source]

Bases: DatabaseClient

Lmdb Database Client class.

__init__(path=None, max_tables=100, map_size=int(1e9), protocol=MinosJsonBinaryProtocol, *args, **kwargs)[source]
Parameters
property already_destroyed: bool

Already Destroy getter.

Returns

A boolean value.

property already_setup: bool

Already Setup getter.

Returns

A boolean value.

async destroy()

Destroy miscellaneous repository things.

Returns

This method does not return anything.

Return type

None

async execute(operation)

Execute an operation.

Parameters

operation (DatabaseOperation) – The operation to be executed.

Returns

This method does not return anything.

Return type

None

fetch_all()

Fetch all values with an asynchronous iterator.

Returns

This method does not return anything.

Return type

AsyncIterator[Any]

async fetch_one()

Fetch one value.

Returns

This method does not return anything.

Return type

Any

classmethod from_config(config=None, **kwargs)

Build a new instance from config.

Parameters
  • config (Optional[Union[Config, Path]]) – Config instance. If None is provided, default config is chosen.

  • kwargs – Additional named arguments.

Returns

A instance of the called class.

Return type

S

classmethod get_builder()

Get the builder class.

Returns

A Builder instance.

Return type

Builder[Ins]

classmethod get_factory(base)

Get an operation factory implementation for an operation factory interface.

Parameters

base (type[minos.common.database.operations.DatabaseOperationFactory]) – The operation factory interface.

Returns

The operation factory implementation.

Return type

DatabaseOperationFactory

async is_valid(**kwargs)

Check if the instance is valid.

Returns

True if it is valid or False otherwise.

Return type

bool

property lock: Optional[DatabaseLock]

Get the lock.

Returns

A DatabaseLock instance.

async reset(**kwargs)

Reset the current instance status.

Parameters

kwargs – Additional named parameters.

Returns

This method does not return anything.

Return type

None

classmethod set_builder(builder)

Set a builder class.

Parameters

builder (Union[Builder[Ins], type[minos.common.builders.Builder[~Ins]]]) – The builder class to be set.

Returns

This method does not return anything.

Return type

None

classmethod set_factory(base, impl)

Register an operation factory implementation for an operation factory interface.

Parameters
Returns

This method does not return anything.

Return type

None

async setup()

Setup miscellaneous repository things.

Returns

This method does not return anything.

Return type

None