DDraceNetwork Docs
sqlite.h
Go to the documentation of this file.
1#ifndef ENGINE_SQLITE_H
2#define ENGINE_SQLITE_H
3#include <memory>
4
5struct sqlite3;
6struct sqlite3_stmt;
7class IConsole;
8class IStorage;
9
11{
12public:
13 void operator()(sqlite3 *pSqlite);
14};
16{
17public:
18 void operator()(sqlite3_stmt *pStmt);
19};
20typedef std::unique_ptr<sqlite3, CSqliteDeleter> CSqlite;
21typedef std::unique_ptr<sqlite3_stmt, CSqliteStmtDeleter> CSqliteStmt;
22
23int SqliteHandleError(IConsole *pConsole, int Error, sqlite3 *pSqlite, const char *pContext);
24#define SQLITE_HANDLE_ERROR(x) SqliteHandleError(pConsole, x, &*pSqlite, #x)
25
26CSqlite SqliteOpen(IConsole *pConsole, IStorage *pStorage, const char *pPath);
27CSqliteStmt SqlitePrepare(IConsole *pConsole, sqlite3 *pSqlite, const char *pStatement);
28#endif // ENGINE_SQLITE_H
Definition: sqlite.h:11
void operator()(sqlite3 *pSqlite)
Definition: sqlite.cpp:7
Definition: sqlite.h:16
void operator()(sqlite3_stmt *pStmt)
Definition: sqlite.cpp:12
Definition: console.h:18
Definition: storage.h:20
std::unique_ptr< sqlite3, CSqliteDeleter > CSqlite
Definition: sqlite.h:20
int SqliteHandleError(IConsole *pConsole, int Error, sqlite3 *pSqlite, const char *pContext)
Definition: sqlite.cpp:17
CSqliteStmt SqlitePrepare(IConsole *pConsole, sqlite3 *pSqlite, const char *pStatement)
Definition: sqlite.cpp:52
CSqlite SqliteOpen(IConsole *pConsole, IStorage *pStorage, const char *pPath)
Definition: sqlite.cpp:28
std::unique_ptr< sqlite3_stmt, CSqliteStmtDeleter > CSqliteStmt
Definition: sqlite.h:21