Easy to use sqlite3 interface for c++.
More...
#include <DBHelper.hpp>
|
| DBHelper (std::string file_path) |
|
void | execute (std::string sql_statement) |
|
std::vector< std::vector< std::string > > | select (std::string sql_statement) |
|
Easy to use sqlite3 interface for c++.
dbHelper provides an easy to use interface to sqlite3. Most sqlite3 functionality is available through this class by passing SQL queries to the provided functions; however it is not a full featured c++ wrapper for sqlite3. If more advanced features are needed I recommend looking elsewhere. Defining "DB_NO_EXCEPT" at compile-time will disable exceptions for dbHelper and make available a new variable, db_errno, which will be set to 0 on success and -1 on failure of any function calls.
- Author
- Sean Grimes, spg63.nosp@m.@cs..nosp@m.drexe.nosp@m.l.ed.nosp@m.u
- Date
- 8-14-15
◆ DBHelper()
DBHelper::DBHelper |
( |
std::string |
file_path | ) |
|
|
inline |
- Parameters
-
file_path | Path to location of sqlite3 db, or where one will be created |
◆ execute()
void DBHelper::execute |
( |
std::string |
sql_statement | ) |
|
|
inline |
- Parameters
-
sql_statement | The sql query to be executed for non-selection commands |
◆ select()
std::vector<std::vector<std::string> > DBHelper::select |
( |
std::string |
sql_statement | ) |
|
|
inline |
- Parameters
-
sql_statement | The sql query used to select from the DB |
- Returns
- Results are returned as a 2D string vector which represents the columns and rows from the resultset of the select call
The documentation for this class was generated from the following file: