libdballe
9.11
|
Options controlling how values are inserted in the database. More...
#include <db.h>
Static Public Member Functions | |
static std::unique_ptr< DBInsertOptions > | create () |
Public Attributes | |
bool | can_replace = false |
If true, then existing data can be rewritten, else data can only be added. | |
bool | can_add_stations = true |
If false, it will not create a missing station record, and only data for existing stations can be added. More... | |
Static Public Attributes | |
static const DBInsertOptions | defaults |
Protected Member Functions | |
DBInsertOptions (const DBInsertOptions &)=default | |
DBInsertOptions (DBInsertOptions &&)=default | |
DBInsertOptions & | operator= (const DBInsertOptions &)=default |
DBInsertOptions & | operator= (DBInsertOptions &&)=default |
Options controlling how values are inserted in the database.
To allow to add members this structure without breaking the ABI, creation of new instances is restricted to DBInsertOptions::create().
bool dballe::DBInsertOptions::can_add_stations = true |
If false, it will not create a missing station record, and only data for existing stations can be added.
If true, then if we are inserting data for a station that does not yet exists in the database, it will be created.