1 #ifndef DBALLE_DB_V6_ATTRV6_H
2 #define DBALLE_DB_V6_ATTRV6_H
6 #include <wreport/var.h>
52 virtual void read(
int id_data, std::function<
void(std::unique_ptr<wreport::Var>)> dest) = 0;
57 virtual void dump(FILE* out) = 0;
72 : id_data(id_data), attr(attr)
75 bool operator<(
const AttrV6& v)
const
77 if (
int d = id_data - v.id_data)
return d < 0;
78 return attr->
code() < v.attr->
code();
81 void dump(FILE* out)
const;
88 emplace_back(attr, id_data);
94 void dump(FILE* out)
const;
104 InsertAttrsV6::iterator iter;
105 bool do_insert =
false;
106 bool do_update =
false;
113 void dump(FILE* out)
const;
void insert_attributes(dballe::sql::Transaction &t, int id_data, const wreport::Var &var, UpdateMode update_mode=UPDATE)
Insert all attributes of the given variable.
Workflow information about an attribute variable listed for bulk insert/update.
Definition: attrv6.h:66
Attribute table management used by the db module.
virtual void insert(dballe::sql::Transaction &t, v6::bulk::InsertAttrsV6 &vars, UpdateMode update_mode=UPDATE)=0
Bulk attribute insert.
Forward declarations for public dballe/sql names.
A RAII transaction interface.
Definition: sql.h:133
Helper class for annotating AttrV6 variables with the current status of the database.
Definition: attrv6.h:101
virtual void dump(FILE *out)=0
Dump the entire contents of the table to an output stream.
virtual void read(int id_data, std::function< void(std::unique_ptr< wreport::Var >)> dest)=0
Load from the database all the attributes for var.
Precompiled queries to manipulate the attr table.
Definition: attrv6.h:26