|
virtual db::Format | format () const =0 |
| Return the format of this DB.
|
|
virtual void | disappear ()=0 |
| Remove all our traces from the database, if applicable.
|
|
virtual void | reset (const char *repinfo_file=0)=0 |
| Reset the database, removing all existing Db-All.e tables and re-creating them empty.
|
|
virtual std::shared_ptr< dballe::db::Transaction > | test_transaction (bool readonly=false)=0 |
| Same as transaction(), but the resulting transaction will throw an exception if commit is called.
|
|
virtual void | vacuum ()=0 |
| Perform database cleanup operations.
|
|
virtual void | attr_query_station (int data_id, std::function< void(std::unique_ptr< wreport::Var >)> &&dest) |
| Query attributes on a station value.
|
|
virtual void | attr_query_data (int data_id, std::function< void(std::unique_ptr< wreport::Var >)> &&dest) |
| Query attributes on a data value.
|
|
void | attr_insert_station (int data_id, const Values &attrs) |
| Insert new attributes on a station value.
|
|
void | attr_insert_data (int data_id, const Values &attrs) |
| Insert new attributes on a data value.
|
|
void | attr_remove_station (int data_id, const db::AttrList &attrs) |
| Delete attributes from a station value.
|
|
void | attr_remove_data (int data_id, const db::AttrList &attrs) |
| Delete attributes from a data value.
|
|
void | dump (FILE *out) |
| Dump the entire contents of the database to an output stream.
|
|
virtual void | print_info (FILE *out) |
| Print informations about the database to the given output stream.
|
|
virtual std::shared_ptr< dballe::Transaction > | transaction (bool readonly=false)=0 |
| Begin a transaction on this database, and return a Transaction object that can be used to commit it.
|
|
virtual std::shared_ptr< CursorStation > | query_stations (const Query &query) |
| Start a query on the station variables archive.
|
|
virtual std::shared_ptr< CursorStationData > | query_station_data (const Query &query) |
| Query the station variables in the database.
|
|
virtual std::shared_ptr< CursorData > | query_data (const Query &query) |
| Query the database.
|
|
virtual std::shared_ptr< CursorSummary > | query_summary (const Query &query) |
| Query a summary of what the result would be for a query.
|
|
virtual std::shared_ptr< CursorMessage > | query_messages (const Query &query) |
| Query the database returning the matching data as Message objects.
|
|
void | remove_all () |
| Remove all data from the database.
|
|
void | remove_station_data (const Query &query) |
| Remove data from the database.
|
|
void | remove_data (const Query &query) |
| Remove data from the database.
|
|
void | import_message (const Message &message, const DBImportOptions &opts=DBImportOptions::defaults) |
| Import a Message into the DB-All.e database.
|
|
void | import_messages (const std::vector< std::shared_ptr< Message > > &messages, const DBImportOptions &opts=DBImportOptions::defaults) |
| Import Messages into the DB-All.e database.
|
|
void | insert_station_data (Data &vals, const DBInsertOptions &opts=DBInsertOptions::defaults) |
| Insert station values into the database.
|
|
void | insert_data (Data &vals, const DBInsertOptions &opts=DBInsertOptions::defaults) |
| Insert data values into the database.
|
|
|
static db::Format | get_default_format () |
|
static void | set_default_format (db::Format format) |
|
static std::shared_ptr< DB > | connect_from_file (const char *pathname) |
| Create from a SQLite file pathname.
|
|
static std::shared_ptr< DB > | connect_memory () |
| Create an in-memory database.
|
|
static std::shared_ptr< DB > | create (std::shared_ptr< sql::Connection > conn) |
| Create a database from an open Connection.
|
|
static bool | is_url (const char *str) |
| Return TRUE if the string looks like a DB URL.
|
|
static const char * | default_repinfo_file () |
| Return the default repinfo file pathname.
|
|
static std::unique_ptr< db::DB > | downcast (std::unique_ptr< dballe::DB > db) |
| Downcast a unique_ptr pointer.
|
|
static std::shared_ptr< db::DB > | downcast (std::shared_ptr< dballe::DB > db) |
| Downcast a shared_ptr pointer.
|
|
static std::shared_ptr< DB > | connect (const DBConnectOptions &opts) |
| Create a new DB.
|
|