|
libdballe
6.8
|
Precompiled query to manipulate the data table. More...
#include <data.h>
Public Member Functions | |
| Data (v6::DB &conn) | |
| void | set_date (const Record &rec) |
| Set the date from the date information in the record. | |
| void | set_station_info () |
| Set id_lev_tr and datetime to mean 'station information'. | |
| void | set_id_lev_tr (int id) |
| Set id_lev_tr to a valid value. | |
| void | set (const wreport::Var &var) |
| Set the value input fields using a wreport::Var. | |
| void | set_value (const char *value) |
| Set the value input fields using a string value. | |
| void | insert_or_fail (bool want_id=false) |
| Insert an entry into the data table, failing on conflicts. More... | |
| bool | insert_or_ignore (bool want_id=false) |
| Insert an entry into the data table, ignoring conflicts. More... | |
| void | insert_or_overwrite (bool want_id=false) |
| Insert an entry into the data table, overwriting on conflicts. More... | |
| void | dump (FILE *out) |
| Dump the entire contents of the table to an output stream. | |
Data Fields | |
| v6::DB & | db |
| DB connection. More... | |
| db::Statement * | istm |
| Precompiled insert statement. | |
| db::Statement * | ustm |
| Precompiled update statement. | |
| db::Statement * | ioustm |
| Precompiled insert or update statement, for DBs where it is available. | |
| db::Statement * | iistm |
| Precompiled insert or ignore statement. | |
| db::Statement * | sidstm |
| Precompiled select ID statement. | |
| DBALLE_SQL_C_SINT_TYPE | id |
| data ID SQL parameter | |
| DBALLE_SQL_C_SINT_TYPE | id_station |
| Station ID SQL parameter. | |
| DBALLE_SQL_C_SINT_TYPE | id_report |
| Report ID SQL parameter. | |
| DBALLE_SQL_C_SINT_TYPE | id_lev_tr |
| Context ID SQL parameter. | |
| SQL_TIMESTAMP_STRUCT | date |
| Date SQL parameter. | |
| wreport::Varcode | id_var |
| Variable type SQL parameter. | |
| char | value [255] |
| Variable value SQL parameter. | |
| SQLLEN | value_ind |
| Variable value indicator. | |
Precompiled query to manipulate the data table.
| void dballe::db::v6::Data::insert_or_fail | ( | bool | want_id = false | ) |
Insert an entry into the data table, failing on conflicts.
Trying to replace an existing value will result in an error.
| bool dballe::db::v6::Data::insert_or_ignore | ( | bool | want_id = false | ) |
Insert an entry into the data table, ignoring conflicts.
Trying to replace an existing value will do nothing.
| void dballe::db::v6::Data::insert_or_overwrite | ( | bool | want_id = false | ) |
Insert an entry into the data table, overwriting on conflicts.
An existing data with the same context and ::dba_varcode will be overwritten.
If id is not NULL, it stores the database id of the inserted/modified data in *id.
1.8.8