libdballe  7.21
Public Member Functions | Protected Attributes | List of all members
dballe::db::v7::sqlite::SQLiteDataCommon< Traits > Class Template Reference
Inheritance diagram for dballe::db::v7::sqlite::SQLiteDataCommon< Traits >:
dballe::db::v7::DataCommon< Traits >

Public Member Functions

 SQLiteDataCommon (dballe::sql::SQLiteConnection &conn)
 
 SQLiteDataCommon (const SQLiteDataCommon &)=delete
 
 SQLiteDataCommon (const SQLiteDataCommon &&)=delete
 
SQLiteDataCommonoperator= (const SQLiteDataCommon &)=delete
 
void read_attrs (int id_data, std::function< void(std::unique_ptr< wreport::Var >)> dest) override
 Load from the database all the attributes for var. More...
 
void write_attrs (int id_data, const Values &values) override
 Replace the attributes of a variable with those in Values.
 
void remove_all_attrs (int id_data) override
 Remove all attributes from a variable.
 
void remove (const v7::IdQueryBuilder &qb) override
 Run the query to delete all records selected by the given QueryBuilder.
 
- Public Member Functions inherited from dballe::db::v7::DataCommon< Traits >
void merge_attrs (int id_data, const Values &attrs)
 Merge the given attributes with the existing attributes of the given variable: More...
 
void remove_attrs (int data_id, const db::AttrList &attrs)
 Remove the given attributes from the given variable, if they exist.
 
virtual void insert (dballe::db::v7::Transaction &t, typename Traits::BulkVars &vars, bulk::UpdateMode update_mode=bulk::UPDATE, bool with_attrs=false)=0
 Bulk variable insert.
 
virtual void dump (FILE *out)=0
 Dump the entire contents of the table to an output stream.
 

Protected Attributes

dballe::sql::SQLiteConnectionconn
 DB connection.
 
dballe::sql::SQLiteStatementread_attrs_stm = nullptr
 Precompiled read attributes statement.
 
dballe::sql::SQLiteStatementwrite_attrs_stm = nullptr
 Precompiled write attributes statement.
 
dballe::sql::SQLiteStatementremove_attrs_stm = nullptr
 Precompiled remove attributes statement.
 
dballe::sql::SQLiteStatementsstm = nullptr
 Precompiled select statement.
 
dballe::sql::SQLiteStatementistm = nullptr
 Precompiled insert statement.
 
dballe::sql::SQLiteStatementustm = nullptr
 Precompiled update statement.
 

Additional Inherited Members

- Protected Member Functions inherited from dballe::db::v7::DataCommon< Traits >
void read_attrs_into_values (int id_data, Values &values)
 Load attributes from the database into a Values.
 

Member Function Documentation

§ read_attrs()

template<typename Traits>
void dballe::db::v7::sqlite::SQLiteDataCommon< Traits >::read_attrs ( int  id_data,
std::function< void(std::unique_ptr< wreport::Var >)>  dest 
)
overridevirtual

Load from the database all the attributes for var.

Parameters
id_dataID of the data row for the value of which we will read attributes
destFunction that will be called to consume the attrbutes as they are loaded.

Implements dballe::db::v7::DataCommon< Traits >.


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