C++ Common
Public Member Functions | List of all members
DBHelper Class Reference

Easy to use sqlite3 interface for c++. More...

#include <DBHelper.hpp>

Public Member Functions

 DBHelper (std::string file_path)
 
void execute (std::string sql_statement)
 
std::vector< std::vector< std::string > > select (std::string sql_statement)
 

Detailed Description

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

Constructor & Destructor Documentation

◆ DBHelper()

DBHelper::DBHelper ( std::string  file_path)
inline
Parameters
file_pathPath to location of sqlite3 db, or where one will be created

Member Function Documentation

◆ execute()

void DBHelper::execute ( std::string  sql_statement)
inline
Parameters
sql_statementThe 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_statementThe 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: