1#ifndef CYCLUS_SRC_SQLITE_BACK_H_
2#define CYCLUS_SRC_SQLITE_BACK_H_
41 virtual std::map<std::string, DbTypes>
ColumnTypes(std::string table);
43 virtual std::set<std::string>
Tables();
54 std::list<ColumnInfo> Schema(std::string table);
67 void CreateTable(
Datum*
d);
81 std::set<std::string> tbl_names_;
83 std::map<std::string, SqlStatement::Ptr> stmts_;
84 std::map<std::string, std::vector<DbTypes> > schemas_;
Used to specify and send a collection of key-value pairs to the Recorder for recording.
Interface implemented by backends that support recording and querying.
Meta data and results of a query.
boost::shared_ptr< SqlStatement > Ptr
An Recorder backend that writes data to an sqlite database.
virtual std::map< std::string, DbTypes > ColumnTypes(std::string table)
Return a map of column names of the specified table to the associated database type.
void Close()
Closes the backend, if approriate.
virtual void Notify(DatumList data)
Writes Datum objects immediately to the database as a single transaction.
virtual std::set< std::string > Tables()
Return a set of all table names currently in the database.
virtual QueryResult Query(std::string table, std::vector< Cond > *conds)
Return a set of rows from the specificed table that match all given conditions.
std::string Name()
Returns a unique name for this backend.
SqliteDb & db()
Returns the underlying sqlite database.
SqliteBack(std::string path)
Creates a new sqlite backend that will write to the database file specified by path.
void Flush()
Executes all pending commands.
An abstraction over the Sqlite native C interface to simplify database creation and data insertion.
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or....
std::vector< Datum * > DatumList
DbTypes
This is the primary list of all supported database types.
T OptionalQuery(InfileTree *tree, std::string query, T default_val)
a query method for optional parameters