aboutsummaryrefslogtreecommitdiffstats
path: root/src/dbhelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbhelper.h')
-rw-r--r--src/dbhelper.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/dbhelper.h b/src/dbhelper.h
index 7385b16..df14ebf 100644
--- a/src/dbhelper.h
+++ b/src/dbhelper.h
@@ -9,7 +9,7 @@
*
* -----------------------------------------------------------------------------
*
- * Give access to the database.
+ * Help other db functions.
*
* -------------------------------------------------------------------------- */
#ifndef DBHELPER_H
@@ -33,7 +33,7 @@
#define COL_CONFIG_ID "ID"
#define COL_CONFIG_PATH "PATH"
#define COL_CONFIG_SECRET "SECRET"
-#define COL_CONFIG_PRIME "PRIME"
+#define COL_CONFIG_PRIMARY "PRIME"
#define COL_REL_PROGRAM_ID "PID"
#define COL_REL_CONFIG_ID "CID"
@@ -43,6 +43,10 @@
#define __END_TRANSACTION__ \
sqlite3_exec(db->ptr, "END TRANSACTION;", NULL, NULL, NULL);
+/****************/
+/* form queries */
+/****************/
+
extern void dbh_form_query_make_tables(char *query);
extern void dbh_form_query_insert_program(char *query);
extern void dbh_form_query_insert_config(char *query);
@@ -52,5 +56,6 @@ extern void dhb_form_query_insert_relationship(char *query);
extern void dhb_form_query_find_program(char *query);
extern void dhb_form_query_find_config(char *query);
extern void dhb_form_query_find_relationship(char *query);
-
+extern void dbh_format_query_select_from_joined_eq(char *query, const char *selection, const char* condition);
+extern void dbh_format_query_select_from_joined_like(char *query, const char *selection, const char* condition);
#endif /* DBHELPER_H */