From 1cfbedd0b199d77ed53e5224435a76978875e2fb Mon Sep 17 00:00:00 2001 From: Anastasis Grammenos Date: Wed, 3 Oct 2018 13:25:21 +0300 Subject: Work on delete --- src/dbhelper.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/dbhelper.h') diff --git a/src/dbhelper.h b/src/dbhelper.h index b2f4abe..a8d3292 100644 --- a/src/dbhelper.h +++ b/src/dbhelper.h @@ -38,10 +38,8 @@ #define COL_REL_PROGRAM_ID "PID" #define COL_REL_CONFIG_ID "CID" -#define __BEGIN_TRANSACTION__ \ - sqlite3_exec(db->ptr, "BEGIN TRANSACTION;", NULL, NULL, NULL); -#define __END_TRANSACTION__ \ - sqlite3_exec(db->ptr, "END TRANSACTION;", NULL, NULL, NULL); +#define __BEGIN_TRANSACTION__ sqlite3_exec(db->ptr, "BEGIN TRANSACTION;", NULL, NULL, NULL); +#define __END_TRANSACTION__ sqlite3_exec(db->ptr, "END TRANSACTION;", NULL, NULL, NULL); /****************/ /* form queries */ @@ -60,4 +58,7 @@ extern void dbh_form_query_select_paths_with_attributes(char *query); extern void dbh_form_query_select_programs(char *query); extern void dbh_form_query_select_from_joined_eq(char *query, const char *selection, const char* condition); extern void dbh_form_query_select_from_joined_like(char *query, const char *selection, const char* condition); +extern void dbh_form_query_delete_x_from_y(char *query, const char *x, const char *y); +extern void dbh_form_query_count_program_relations(char *query); +extern void dbh_form_query_get_pid_from_cid(char *query); #endif /* DBHELPER_H */ -- cgit v1.2.3