1 #ifndef CYCLUS_SRC_SQLITE_BACK_H_ 2 #define CYCLUS_SRC_SQLITE_BACK_H_ 43 virtual std::set<std::string>
Tables();
67 void CreateTable(
Datum* d);
69 void BuildStmt(
Datum* d);
72 void WriteDatum(
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_;
89 #endif // CYCLUS_SRC_SQLITE_BACK_H_
An Recorder backend that writes data to an sqlite database.
Interface implemented by backends that support recording and querying.
Meta data and results of a query.
An abstraction over the Sqlite native C interface to simplify database creation and data insertion...
std::string Name()
Returns a unique name for this backend.
DbTypes
This is the master list of all supported database types.
virtual void Notify(DatumList data)
Writes Datum objects immediately to the database as a single transaction.
virtual QueryResult Query(std::string table, std::vector< Cond > *conds)
Return a set of rows from the specificed table that match all given conditions.
SqliteBack(std::string path)
Creates a new sqlite backend that will write to the database file specified by path.
Used to specify and send a collection of key-value pairs to the Recorder for recording.
virtual std::set< std::string > Tables()
Return a set of all table names currently in the database.
void Flush()
Executes all pending commands.
boost::shared_ptr< SqlStatement > Ptr
taken directly from OsiSolverInterface.cpp on 2/17/14 from https://projects.coin-or.org/Osi/browser/trunk.
std::vector< Datum * > DatumList
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.
SqliteDb & db()
Returns the underlying sqlite database.