anymodel.storages.short_long

Composite storage implementation with short and long-term storage.

This module provides a storage backend that combines two storage backends, typically for implementing hot/cold storage strategies.

Classes

class anymodel.storages.short_long.ShortLongStorage(short_storage, long_storage)[source]

Bases: Storage

Composite storage with short-term and long-term backends.

Combines two storage backends to implement tiered storage strategies, checking short-term storage first before falling back to long-term storage.

__init__(short_storage, long_storage)[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]
archive(tablename)[source]
add_table(mapper)[source]
migrate(**kwargs)[source]