libdballe 9.6
Public Member Functions | List of all members
dballe::Transaction Class Referenceabstract
Inheritance diagram for dballe::Transaction:
dballe::db::Transaction dballe::db::v7::Transaction dballe::db::v7::TestTransaction

Public Member Functions

virtual void commit ()=0
 Commit this transaction.
 
virtual void rollback ()=0
 Roll back this transaction.
 
virtual void rollback_nothrow () noexcept=0
 Roll back this transaction.
 
virtual std::shared_ptr< CursorStationquery_stations (const Query &query)=0
 Start a query on the station variables archive.
 
virtual std::shared_ptr< CursorStationDataquery_station_data (const Query &query)=0
 Query the station variables in the database.
 
virtual std::shared_ptr< CursorDataquery_data (const Query &query)=0
 Query the database.
 
virtual std::shared_ptr< CursorSummaryquery_summary (const Query &query)=0
 Query a summary of what the result would be for a query.
 
virtual std::shared_ptr< CursorMessagequery_messages (const Query &query)=0
 Query the database returning the matching data as Message objects.
 
virtual void remove_all ()=0
 Remove all data from the database.
 
virtual void remove_station_data (const Query &query)=0
 Remove data from the database.
 
virtual void remove_data (const Query &query)=0
 Remove data from the database.
 
virtual void import_message (const Message &message, const DBImportOptions &opts=DBImportOptions::defaults)=0
 Import a Message into the DB-All.e database.
 
virtual void import_messages (const std::vector< std::shared_ptr< Message > > &messages, const DBImportOptions &opts=DBImportOptions::defaults)
 Import Messages into the DB-All.e database.
 
virtual void insert_station_data (Data &data, const DBInsertOptions &opts=DBInsertOptions::defaults)=0
 Insert station values into the database.
 
virtual void insert_data (Data &data, const DBInsertOptions &opts=DBInsertOptions::defaults)=0
 Insert data values into the database.
 

Member Function Documentation

◆ commit()

virtual void dballe::Transaction::commit ( )
pure virtual

Commit this transaction.

Implemented in dballe::db::v7::Transaction, and dballe::db::v7::TestTransaction.

◆ import_message()

virtual void dballe::Transaction::import_message ( const Message message,
const DBImportOptions opts = DBImportOptions::defaults 
)
pure virtual

Import a Message into the DB-All.e database.

Parameters
messageThe Message to import
optsOptions controlling the import process

Implemented in dballe::db::v7::Transaction.

◆ import_messages()

virtual void dballe::Transaction::import_messages ( const std::vector< std::shared_ptr< Message > > &  messages,
const DBImportOptions opts = DBImportOptions::defaults 
)
virtual

Import Messages into the DB-All.e database.

Parameters
messagesThe messages to import
optsOptions controlling the import process

Reimplemented in dballe::db::v7::Transaction.

◆ insert_data()

virtual void dballe::Transaction::insert_data ( Data data,
const DBInsertOptions opts = DBInsertOptions::defaults 
)
pure virtual

Insert data values into the database.

The IDs of the station and all variables that were inserted will be stored in vals.

Parameters
dataThe values to insert.
optsOptions controlling the insert operation

Implemented in dballe::db::v7::Transaction.

◆ insert_station_data()

virtual void dballe::Transaction::insert_station_data ( Data data,
const DBInsertOptions opts = DBInsertOptions::defaults 
)
pure virtual

Insert station values into the database.

The IDs of the station and all variables that were inserted will be stored in vals.

Parameters
dataThe values to insert.
optsOptions controlling the insert operation

Implemented in dballe::db::v7::Transaction.

◆ query_data()

virtual std::shared_ptr< CursorData > dballe::Transaction::query_data ( const Query query)
pure virtual

Query the database.

When multiple values per variable are present, the results will be presented in increasing order of priority.

Parameters
queryThe Query selecting the data to return
Returns
The cursor to use to iterate over the results

Implemented in dballe::db::v7::Transaction.

◆ query_messages()

virtual std::shared_ptr< CursorMessage > dballe::Transaction::query_messages ( const Query query)
pure virtual

Query the database returning the matching data as Message objects.

Parameters
queryThe Query selecting the data that will go into the Message objects
Returns
The cursor to use to iterate over the results

Implemented in dballe::db::v7::Transaction.

◆ query_station_data()

virtual std::shared_ptr< CursorStationData > dballe::Transaction::query_station_data ( const Query query)
pure virtual

Query the station variables in the database.

When multiple values per variable are present, the results will be presented in increasing order of priority.

Parameters
queryThe Query selecting the station data to return
Returns
The cursor to use to iterate over the results

Implemented in dballe::db::v7::Transaction.

◆ query_stations()

virtual std::shared_ptr< CursorStation > dballe::Transaction::query_stations ( const Query query)
pure virtual

Start a query on the station variables archive.

The cursor will iterate over unique lat, lon, ident triples, and will contain all station vars. If a station var exists twice on two different networks, only one will be present: the one of the network with the highest priority.

Parameters
queryThe Query selecting the stations to return
Returns
The cursor to use to iterate over the results

Implemented in dballe::db::v7::Transaction.

◆ query_summary()

virtual std::shared_ptr< CursorSummary > dballe::Transaction::query_summary ( const Query query)
pure virtual

Query a summary of what the result would be for a query.

Parameters
queryThe Query selecting the data to summarise
Returns
The cursor to use to iterate over the results

Implemented in dballe::db::v7::Transaction.

◆ remove_all()

virtual void dballe::Transaction::remove_all ( )
pure virtual

Remove all data from the database.

This is faster than remove() with an empty record, and unlike reset() it preserves existing report information.

Implemented in dballe::db::v7::Transaction.

◆ remove_data()

virtual void dballe::Transaction::remove_data ( const Query query)
pure virtual

Remove data from the database.

Parameters
queryThe query selecting the data to remove

Implemented in dballe::db::v7::Transaction.

◆ remove_station_data()

virtual void dballe::Transaction::remove_station_data ( const Query query)
pure virtual

Remove data from the database.

Parameters
queryThe query selecting the data to remove

Implemented in dballe::db::v7::Transaction.

◆ rollback()

virtual void dballe::Transaction::rollback ( )
pure virtual

Roll back this transaction.

Implemented in dballe::db::v7::Transaction.

◆ rollback_nothrow()

virtual void dballe::Transaction::rollback_nothrow ( )
pure virtualnoexcept

Roll back this transaction.

Implemented in dballe::db::v7::Transaction.


The documentation for this class was generated from the following file: