From 0a5257ea63cce0cebc93eb71e51dbbb3eb14a9a3 Mon Sep 17 00:00:00 2001 From: gramanas Date: Sun, 22 Apr 2018 21:30:31 +0300 Subject: Add read, the actual linking remains --- src/dbhelper.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/dbhelper.h') 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 */ -- cgit v1.2.3