system.interfaces.stores module¶
Abstract ACID store interfaces: ACID, indexed, and QEP-queryable stores.
- class system.interfaces.stores.ACIDStore(persistence_layer: KeyValueStore)[source]¶
Bases:
ABCInterface for an ACID store
- begin_transaction() int[source]¶
Starts a new transaction and returns its transaction id. Also adds a new entry with metadata for this transaction in the transaction dictionary.
- commit_transaction(TA_id: int) None[source]¶
Commit a transaction.
- Parameters:
TA_id – The id of the transaction to commit
- abort_transaction(TA_id: int) None[source]¶
Abort a transaction.
- Parameters:
TA_id – The id of the transaction to abort
- class system.interfaces.stores.IndexedACIDStore(persistence_layer: KeyValueStore)[source]¶
Bases:
ACIDStore,ABCInterface for an indexed ACID store
- create_index(index_name: str, attribute: str, operator: str) None[source]¶
Creates an index on the store with the given name. Adds the metadata to the catalog and bulkloads the index
- Parameters:
index_name – the name of the index
attribute – the attribute to create the index on
operator – the operator to use for the index
- drop_index(index_name: str) None[source]¶
Drops the index with the given name.
- Parameters:
index_name – the name of the index to drop
- get_suitable_indexes(attribute: str, operator: str) Iterator[IndexProperties][source]¶
Returns a list of suitable indexes for the given clause.
- Parameters:
attribute – the attribute of the clause
operator – the operator of the clause
- Returns:
a list of suitable indexes
- class system.interfaces.stores.QEPQueryableIndexedACIDStore(persistence_layer: KeyValueStore)[source]¶
Bases:
QEPQueryable,IndexedACIDStore,ABCInterface for a QEP-queryable indexed ACID store