mirror of
https://github.com/fairwaves/openbts-2.8.git
synced 2025-10-23 16:13:51 +00:00
This patch makes a step towards using a system-wide sqlite3 lib. It moves sqlite3util.cpp/.h to CommonLibs and leaves only original sqlite3 files in the sqlite3 dir of OpenBTS. I do not claim any copyright over this change, as it's very basic. Looking forward to see it merged into mainline. git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@4467 19bc5d8c-e614-43d4-8b26-e1612bc8e597
30 lines
974 B
C
30 lines
974 B
C
#ifndef SQLITE3UTIL_H
|
|
#define SQLITE3UTIL_H
|
|
|
|
#include <sqlite3.h>
|
|
|
|
int sqlite3_prepare_statement(sqlite3* DB, sqlite3_stmt **stmt, const char* query);
|
|
|
|
int sqlite3_run_query(sqlite3* DB, sqlite3_stmt *stmt);
|
|
|
|
bool sqlite3_single_lookup(sqlite3* DB, const char *tableName,
|
|
const char* keyName, const char* keyData,
|
|
const char* valueName, unsigned &valueData);
|
|
|
|
bool sqlite3_single_lookup(sqlite3* DB, const char* tableName,
|
|
const char* keyName, const char* keyData,
|
|
const char* valueName, char* &valueData);
|
|
|
|
// This function returns an allocated string that must be free'd by the caller.
|
|
bool sqlite3_single_lookup(sqlite3* DB, const char* tableName,
|
|
const char* keyName, unsigned keyData,
|
|
const char* valueName, char* &valueData);
|
|
|
|
bool sqlite3_exists(sqlite3* DB, const char* tableName,
|
|
const char* keyName, const char* keyData);
|
|
|
|
/** Run a query, ignoring the result; return true on success. */
|
|
bool sqlite3_command(sqlite3* DB, const char* query);
|
|
|
|
#endif
|