22 lines
335 B
C++
22 lines
335 B
C++
![]() |
#ifndef DATABASE_HPP_
|
||
|
#define DATABASE_HPP_
|
||
|
|
||
|
#include <string>
|
||
|
#include <sqlite3.h>
|
||
|
|
||
|
|
||
|
class DatabaseError {};
|
||
|
|
||
|
// resource management class
|
||
|
class DatabaseHandle {
|
||
|
public:
|
||
|
DatabaseHandle(const std::string& filename);
|
||
|
~DatabaseHandle();
|
||
|
sqlite3 *getHandle() { return dbh; }
|
||
|
private:
|
||
|
sqlite3 *dbh;
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif /* DATABASE_HPP_ */
|