diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-04-22 21:30:31 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-04-22 21:30:31 +0300 |
commit | 0a5257ea63cce0cebc93eb71e51dbbb3eb14a9a3 (patch) | |
tree | 6cdc4ddeec5727ebb0dd112ef01f8661e2447c0e /src/dbhelper.h | |
parent | 225600aadffc6fdb188fef230cdab67e1242e3a3 (diff) | |
download | ck-0a5257ea63cce0cebc93eb71e51dbbb3eb14a9a3.tar.gz ck-0a5257ea63cce0cebc93eb71e51dbbb3eb14a9a3.tar.bz2 ck-0a5257ea63cce0cebc93eb71e51dbbb3eb14a9a3.zip |
Add read, the actual linking remains
Diffstat (limited to 'src/dbhelper.h')
-rw-r--r-- | src/dbhelper.h | 11 |
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 */ |