summaryrefslogtreecommitdiffstats
path: root/database/sqlite/sqlite.h
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-12-07 21:25:58 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-12-07 21:25:58 +0100
commit0180c2a6b2163bd2f703aeeb27931b96dc44a11e (patch)
treee3e910f3d910ab542e2b89655d077ff3802e8a98 /database/sqlite/sqlite.h
parent90da20df8560d301d34d65d63d35ca3bc822bd53 (diff)
downloadeurephia-0180c2a6b2163bd2f703aeeb27931b96dc44a11e.tar.gz
eurephia-0180c2a6b2163bd2f703aeeb27931b96dc44a11e.tar.xz
eurephia-0180c2a6b2163bd2f703aeeb27931b96dc44a11e.zip
Extended sqlite.[ch] with sqlite_query_mapped(...)
This functions does almost the same as sqlite_query(...), it takes an SQL statement without the WHERE clause. The where clause is built up based on the fields sent in via the eDBfieldMap struct, containing the fields and values to look for.
Diffstat (limited to 'database/sqlite/sqlite.h')
-rw-r--r--database/sqlite/sqlite.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/database/sqlite/sqlite.h b/database/sqlite/sqlite.h
index 8d221fd..2898c53 100644
--- a/database/sqlite/sqlite.h
+++ b/database/sqlite/sqlite.h
@@ -22,7 +22,7 @@
# define SQLITE_H_
#include <stdarg.h>
-
+#include <eurephiadb_mapping.h>
typedef struct __sqlite_header {
unsigned int fieldid;
@@ -64,6 +64,7 @@ typedef struct __sqlite_dbresult {
#define sqlite_free_results(r) { _sqlite_free_results(r); r = NULL; }
void _sqlite_free_results(dbresult *);
dbresult *sqlite_query(eurephiaCTX *ctx, const char *, ...);
+dbresult *sqlite_query_mapped(eurephiaCTX *, char *, eDBfieldMap *);
char *sqlite_get_value(dbresult *res, int, int);
void sqlite_dump_result(FILE *, dbresult *);
int sqlite_get_numtuples(dbresult *);