system.stores.IndexedMVCC module¶
Indexed transactional key-value store built on MVCC.
- class system.stores.IndexedMVCC.IndexedTransactionalKeyValueStore(use_brute_force_validation: bool = False)[source]¶
Bases:
TransactionalKeyValueStore,IndexedACIDStoreA fully transactional versioned (MVCC) key value store adding support for indexes.
- class IndexCatalogueEntry(index_properties: IndexProperties, index: KeyValueStore[object, str])[source]¶
Bases:
objectEntries used for the index catalog.
- index_properties: IndexProperties¶
- index: KeyValueStore[object, str]¶
- create_index(index_name: str, attribute: str, operator: str) None[source]¶
See
IndexedACIDStore.create_index().Only equality indexes (operator
"=") are supported; any other operator raises. Raises as well if an index with the given name already exists. The index is backed by aPythonDictionaryIndexand acts as a filter index, i.e. lookups return a superset of matches that still has to be post-filtered.
- drop_index(index_name: str) None[source]¶
See
IndexedACIDStore.drop_index().Removes the index from both catalogues (by name and by properties). Raises if no index with the given name exists.
- abort_transaction(TA_id: int) None[source]¶
See
TransactionalKeyValueStore.abort_transaction().Before delegating to the base implementation, de-indexes every work-in-progress version created by the transaction from all indexes, so the indexes stay consistent with the reverted store.
- get_suitable_indexes(attribute: str, operator: str) Iterator[IndexProperties][source]¶
See
IndexedACIDStore.get_suitable_indexes().
- update_object(object_id: str, updated_object: object, TA_id: int) None[source]¶
See
TransactionalKeyValueStore.update_object().After delegating to the base implementation, maintains all indexes for the change: the new object version is indexed and any superseded work-in-progress version of the same transaction is de-indexed.