anymodel.storages.memory

In-memory storage implementation for testing and temporary data.

Classes

class anymodel.storages.memory.MemoryStorage[source]

Bases: Storage

In-memory storage backend.

Stores entities in dictionaries without persistence. Useful for testing and temporary data that doesn’t need to survive application restarts.

__init__()[source]
migrate(**kwargs)[source]
delete(entity)[source]
Return type:

Entity

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, criteria, values)[source]
Return type:

None