kurtis.heimerl | e766abb | 2012-11-14 03:51:51 +0000 | [diff] [blame] | 1 | #ifndef SQLITE3UTIL_H |
| 2 | #define SQLITE3UTIL_H |
| 3 | |
| 4 | #include <sqlite3.h> |
| 5 | |
| 6 | int sqlite3_prepare_statement(sqlite3* DB, sqlite3_stmt **stmt, const char* query); |
| 7 | |
| 8 | int sqlite3_run_query(sqlite3* DB, sqlite3_stmt *stmt); |
| 9 | |
| 10 | bool sqlite3_single_lookup(sqlite3* DB, const char *tableName, |
| 11 | const char* keyName, const char* keyData, |
| 12 | const char* valueName, unsigned &valueData); |
| 13 | |
| 14 | bool sqlite3_single_lookup(sqlite3* DB, const char* tableName, |
| 15 | const char* keyName, const char* keyData, |
| 16 | const char* valueName, char* &valueData); |
| 17 | |
| 18 | // This function returns an allocated string that must be free'd by the caller. |
| 19 | bool sqlite3_single_lookup(sqlite3* DB, const char* tableName, |
| 20 | const char* keyName, unsigned keyData, |
| 21 | const char* valueName, char* &valueData); |
| 22 | |
| 23 | bool sqlite3_exists(sqlite3* DB, const char* tableName, |
| 24 | const char* keyName, const char* keyData); |
| 25 | |
| 26 | /** Run a query, ignoring the result; return true on success. */ |
| 27 | bool sqlite3_command(sqlite3* DB, const char* query); |
| 28 | |
| 29 | #endif |