45#include "tkdb_column.h"
49typedef std::map<tkstring,tkdb_column>
row;
93 std::cout<<
"value : "<<
value<<std::endl;
94 std::cout<<
"unit : "<<
unit<<std::endl;
95 std::cout<<
"err : "<<
err<<std::endl;
96 std::cout<<
"err_low : "<<
err_low<<std::endl;
97 std::cout<<
"err_high: "<<
err_high<<std::endl;
98 std::cout<<
"info : "<<
info<<std::endl;
104 sqlite3* fDataBase{};
106 std::vector<tkstring> fOrderedColumnNames;
107 sqlite3_stmt* fSQL_stmt{};
108 bool fReading =
false;
109 tkstring fConstraint;
119 return fColumns[_column];
124 void print_rows(
const char* _selection,
const char *_properties=
"*");
131 void add_column(
const char *_colname,
const char *_coltype);
144 int exec_sql(
const char *_cmd);
Simple structure to store a table column.
Representaiton of a sqlite data table.
void read_measure(measure_data_struct &_struct, const tkstring &_col_base_name)
tkdb_column & operator[](const char *_column)
void begin(tkstring _condition, tkstring _selection="*")
bool has_column(const tkstring &_col_name)
void update_row(const tkstring &_where)
void load()
resets column values and ends the select statement
bool next()
executes the select statement
void print_columns(const tkstring &_opt="")
void add_constraint(const char *_constraint)
void print_rows(const char *_selection, const char *_properties="*")
void end()
reads the next entry coresponding to the select statement and fills columns
void print(const tkstring &_opt="")
void add_column(const char *_colname, const char *_coltype)
void reset_column_values()
std::string with usefull tricks from TString (ROOT) and KVString (KaliVeda) and more....
std::map< tkstring, tkdb_column > row
data structure used to fill a tkmeasure object from the sqlite database