anymodel.storages.base

Base storage module defining the storage interface.

Classes

class anymodel.storages.base.Storage[source]

Bases: object

Abstract base class for storage backends.

All storage implementations must inherit from this class and implement the required methods for CRUD operations and schema management.

add_table(mapper)[source]
migrate(**kwargs)[source]
find_one(tablename, criteria)[source]
Return type:

Optional[Mapping[str, Any]]

find_many(tablename, criteria, *, limit=None, offset=None)[source]
Return type:

Iterable[Mapping[str, Any]]

insert(tablename, values)[source]
Return type:

Mapping[str, Any]

update(tablename, identity, values)[source]
Return type:

None

delete(tablename, identity)[source]