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

Public Member Functions

void commit () override
 Commit this transaction.
 
 Transaction (std::shared_ptr< v7::DB > db, std::unique_ptr< dballe::sql::Transaction > sql_transaction)
 
 Transaction (const Transaction &)=delete
 
 Transaction (Transaction &&)=delete
 
- Public Member Functions inherited from dballe::db::v7::Transaction
 Transaction (std::shared_ptr< v7::DB > db, std::unique_ptr< dballe::sql::Transaction > sql_transaction)
 
 Transaction (const Transaction &)=delete
 
 Transaction (Transaction &&)=delete
 
Transactionoperator= (const Transaction &)=delete
 
Transactionoperator= (Transaction &&)=delete
 
v7::Repinforepinfo ()
 Access the repinfo table.
 
v7::Stationstation ()
 Access the station table.
 
v7::LevTrlevtr ()
 Access the levtr table.
 
v7::StationDatastation_data ()
 Access the station_data table.
 
v7::Datadata ()
 Access the data table.
 
void commit () override
 Commit this transaction.
 
void rollback () override
 Roll back this transaction.
 
void rollback_nothrow () noexcept override
 Roll back this transaction.
 
void clear_cached_state () override
 Clear state information cached during the transaction.
 
std::shared_ptr< dballe::CursorStationquery_stations (const Query &query)
 Start a query on the station variables archive.
 
std::shared_ptr< dballe::CursorStationDataquery_station_data (const Query &query) override
 Query the station variables in the database.
 
std::shared_ptr< dballe::CursorDataquery_data (const Query &query)
 Query the database.
 
std::shared_ptr< dballe::CursorSummaryquery_summary (const Query &query)
 Query a summary of what the result would be for a query.
 
std::shared_ptr< dballe::CursorMessagequery_messages (const Query &query)
 Query the database returning the matching data as Message objects.
 
void attr_query_station (int data_id, std::function< void(std::unique_ptr< wreport::Var >)> dest) override
 Query attributes on a station value.
 
void attr_query_data (int data_id, std::function< void(std::unique_ptr< wreport::Var >)> dest) override
 Query attributes on a data value.
 
void insert_station_data (dballe::Data &vals, const dballe::DBInsertOptions &opts=dballe::DBInsertOptions::defaults) override
 Insert station values into the database.
 
void insert_data (dballe::Data &vals, const dballe::DBInsertOptions &opts=dballe::DBInsertOptions::defaults) override
 Insert data values into the database.
 
void remove_station_data (const Query &query) override
 Remove data from the database.
 
void remove_data (const Query &query) override
 Remove data from the database.
 
void remove_station_data_by_id (int id)
 
void remove_data_by_id (int id)
 
void remove_all () override
 Remove all data from the database.
 
void attr_insert_station (int data_id, const Values &attrs) override
 Insert new attributes on a station value.
 
void attr_insert_data (int data_id, const Values &attrs) override
 Insert new attributes on a data value.
 
void attr_remove_station (int data_id, const db::AttrList &attrs) override
 Delete attributes from a station value.
 
void attr_remove_data (int data_id, const db::AttrList &attrs) override
 Delete attributes from a data value.
 
void import_message (const Message &message, const dballe::DBImportOptions &opts) override
 Import a Message into the DB-All.e database.
 
void import_messages (const std::vector< std::shared_ptr< Message > > &msgs, const dballe::DBImportOptions &opts) override
 Import Messages into the DB-All.e database.
 
void update_repinfo (const char *repinfo_file, int *added, int *deleted, int *updated) override
 Update the repinfo table in the database, with the data found in the given file.
 
void dump (FILE *out) override
 Dump the entire contents of the database to an output stream.
 
virtual void clear_cached_state ()=0
 Clear state information cached during the transaction.
 
virtual void attr_query_station (int data_id, std::function< void(std::unique_ptr< wreport::Var >)> dest)=0
 Query attributes on a station value.
 
virtual void attr_query_data (int data_id, std::function< void(std::unique_ptr< wreport::Var >)> dest)=0
 Query attributes on a data value.
 
virtual void attr_insert_station (int data_id, const Values &attrs)=0
 Insert new attributes on a station value.
 
virtual void attr_insert_data (int data_id, const Values &attrs)=0
 Insert new attributes on a data value.
 
virtual void attr_remove_station (int data_id, const db::AttrList &attrs)=0
 Delete attributes from a station value.
 
virtual void attr_remove_data (int data_id, const db::AttrList &attrs)=0
 Delete attributes from a data value.
 
virtual void update_repinfo (const char *repinfo_file, int *added, int *deleted, int *updated)=0
 Update the repinfo table in the database, with the data found in the given file.
 
virtual void dump (FILE *out)=0
 Dump the entire contents of the database to an output stream.
 
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.
 

Additional Inherited Members

- Public Types inherited from dballe::db::v7::Transaction
typedef v7::DB DB
 
- Static Public Member Functions inherited from dballe::db::v7::Transaction
static Transactiondowncast (dballe::db::Transaction &transaction)
 
- Public Attributes inherited from dballe::db::v7::Transaction
std::shared_ptr< v7::DBdb
 
std::shared_ptr< dballe::sql::Transactionsql_transaction
 SQL-side transaction.
 
bool fired = false
 True if commit or rollback have already been called on this transaction.
 
v7::Batch batch
 Batch importer.
 
v7::Tracer< v7::trace::Transactiontrc
 Tracing system.
 
- Protected Member Functions inherited from dballe::db::v7::Transaction
void add_msg_to_batch (Tracer<> &trc, const Message &message, const dballe::DBImportOptions &opts)
 
void track_cursor (std::weak_ptr< dballe::Cursor > cursor)
 
- Protected Attributes inherited from dballe::db::v7::Transaction
v7::Repinfom_repinfo = nullptr
 Report information.
 
v7::Stationm_station = nullptr
 Station information.
 
v7::LevTrm_levtr = nullptr
 Level/timerange information.
 
v7::StationDatam_station_data = nullptr
 Station data.
 
v7::Datam_data = nullptr
 Variable data.
 
std::vector< std::weak_ptr< dballe::Cursor > > tracked_cursors
 Track active cursors to invalidate them on commit/rollback.
 

Member Function Documentation

◆ commit()

void dballe::db::v7::TestTransaction::commit ( )
overridevirtual

Commit this transaction.

Reimplemented from dballe::db::v7::Transaction.


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