aboutsummaryrefslogtreecommitdiffstats
path: root/src/queries.c
diff options
context:
space:
mode:
authorAnastasis Grammenos <anastasis.gramm2@gmail.com>2019-03-14 20:15:52 +0200
committerAnastasis Grammenos <anastasis.gramm2@gmail.com>2019-03-14 20:15:52 +0200
commitf30142e0cbe7ff6dc4339682f66da72cb5fd9428 (patch)
tree8978a0393cf8fa053b69da1f806d13b27e5199a5 /src/queries.c
parent387b31f293347a8bc05dbd4c5f2d063a7b8bdba9 (diff)
downloadck-f30142e0cbe7ff6dc4339682f66da72cb5fd9428.tar.gz
ck-f30142e0cbe7ff6dc4339682f66da72cb5fd9428.tar.bz2
ck-f30142e0cbe7ff6dc4339682f66da72cb5fd9428.zip
Replace form_query with fq
Diffstat (limited to 'src/queries.c')
-rw-r--r--src/queries.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/queries.c b/src/queries.c
index 8b0a6e8..e4a46fd 100644
--- a/src/queries.c
+++ b/src/queries.c
@@ -11,7 +11,7 @@
#include "queries.h"
#include "ckutil.h"
-void dbh_form_query_make_tables(char *query) {
+void dbh_fq_make_tables(char *query) {
char tmp[STR_L] = "CREATE TABLE ";
strcat(tmp, TBL_PROGRAM);
strcat(tmp, "(");
@@ -51,7 +51,7 @@ void dbh_form_query_make_tables(char *query) {
strcpy(query, tmp);
}
-void dbh_form_query_insert_program(char *query) {
+void dbh_fq_insert_program(char *query) {
char tmp[STR_L] = "INSERT INTO ";
strcat(tmp, TBL_PROGRAM);
strcat(tmp, " VALUES(?, ?);");
@@ -59,7 +59,7 @@ void dbh_form_query_insert_program(char *query) {
strcpy(query, tmp);
}
-void dbh_form_query_insert_config(char *query) {
+void dbh_fq_insert_config(char *query) {
char tmp[STR_L] = "INSERT INTO ";
strcat(tmp, TBL_CONFIG);
strcat(tmp, " VALUES(?, ?, ?, ?);");
@@ -67,7 +67,7 @@ void dbh_form_query_insert_config(char *query) {
strcpy(query, tmp);
}
-void dbh_form_query_select_id_from(char *query, const char* tableName) {
+void dbh_fq_select_id_from(char *query, const char* tableName) {
char tmp[STR_M] = "SELECT ID FROM ";
strcat(tmp, tableName);
strcat(tmp, " ORDER BY ID;");
@@ -75,11 +75,11 @@ void dbh_form_query_select_id_from(char *query, const char* tableName) {
strcpy(query, tmp);
}
-void dbh_form_query_select_all_tables(char *query) {
+void dbh_fq_select_all_tables(char *query) {
strcpy(query, "SELECT * FROM SQLITE_MASTER WHERE type='table';");
}
-void dhb_form_query_insert_relationship(char *query) {
+void dhb_fq_insert_relationship(char *query) {
char tmp[STR_M] = "INSERT INTO ";
strcat(tmp, TBL_REL);
strcat(tmp, " VALUES(?, ?);");
@@ -87,7 +87,7 @@ void dhb_form_query_insert_relationship(char *query) {
strcpy(query, tmp);
}
-void dhb_form_query_find_program(char *query) {
+void dhb_fq_find_program(char *query) {
char tmp[STR_M] = "SELECT ID FROM ";
strcat(tmp, TBL_PROGRAM);
strcat(tmp, " WHERE ");
@@ -97,7 +97,7 @@ void dhb_form_query_find_program(char *query) {
strcpy(query, tmp);
}
-void dhb_form_query_find_config(char *query) {
+void dhb_fq_find_config(char *query) {
char tmp[STR_M] = "SELECT ID FROM ";
strcat(tmp, TBL_CONFIG);
strcat(tmp, " WHERE ");
@@ -107,7 +107,7 @@ void dhb_form_query_find_config(char *query) {
strcpy(query, tmp);
}
-void dhb_form_query_find_relationship(char *query) {
+void dhb_fq_find_relationship(char *query) {
char tmp[STR_M] = "SELECT ";
strcat(tmp, COL_REL_PROGRAM_ID);
strcat(tmp, ", ");
@@ -123,7 +123,7 @@ void dhb_form_query_find_relationship(char *query) {
strcpy(query, tmp);
}
-void dbh_form_query_select_from_joined_eq(char *query, const char *selection, const char* condition) {
+void dbh_fq_select_from_joined_eq(char *query, const char *selection, const char* condition) {
char tmp[STR_L] = "SELECT ";
strcat(tmp, selection);
strcat(tmp, " FROM ");
@@ -179,7 +179,7 @@ void dbh_format_query_select_from_joined_like(char *query, const char *selection
strcpy(query, tmp);
}
-void dbh_form_query_select_paths_with_attributes(char *query) {
+void dbh_fq_select_paths_with_attributes(char *query) {
char tmp[STR_L] = "SELECT ";
strcat(tmp, COL_CONFIG_PATH);
strcat(tmp, ",");
@@ -193,7 +193,7 @@ void dbh_form_query_select_paths_with_attributes(char *query) {
strcpy(query, tmp);
}
-void dbh_form_query_select_programs(char *query) {
+void dbh_fq_select_programs(char *query) {
char tmp[STR_L] = "SELECT ";
strcat(tmp, COL_PROGRAM_NAME);
strcat(tmp, " FROM ");
@@ -203,7 +203,7 @@ void dbh_form_query_select_programs(char *query) {
strcpy(query, tmp);
}
-void dbh_form_query_delete_x_from_y(char *query, const char *x, const char *y) {
+void dbh_fq_delete_x_from_y(char *query, const char *x, const char *y) {
char tmp[STR_M] = "DELETE FROM ";
strcat(tmp, y);
strcat(tmp, " WHERE ");
@@ -213,7 +213,7 @@ void dbh_form_query_delete_x_from_y(char *query, const char *x, const char *y) {
strcpy(query, tmp);
}
-void dbh_form_query_count_program_relations(char *query) {
+void dbh_fq_count_program_relations(char *query) {
char tmp[STR_M] = "SELECT COUNT(*) FROM ";
strcat(tmp, TBL_REL);
strcat(tmp, " WHERE ");
@@ -223,7 +223,7 @@ void dbh_form_query_count_program_relations(char *query) {
strcpy(query, tmp);
}
-void dbh_form_query_get_pid_from_cid(char *query) {
+void dbh_fq_get_pid_from_cid(char *query) {
char tmp[STR_M] = "SELECT ";
strcat(tmp, COL_REL_PROGRAM_ID);
strcat(tmp, " FROM ");
@@ -235,7 +235,7 @@ void dbh_form_query_get_pid_from_cid(char *query) {
strcpy(query, tmp);
}
-void dbh_form_query_secret_enabled(char *query) {
+void dbh_fq_secret_enabled(char *query) {
char tmp[STR_M] = "SELECT ";
strcat(tmp, COL_CTX_VAL);
strcat(tmp, " FROM ");
@@ -249,7 +249,7 @@ void dbh_form_query_secret_enabled(char *query) {
strcpy(query, tmp);
}
-void dbh_form_query_set_secret_enabled(char *query) {
+void dbh_fq_set_secret_enabled(char *query) {
char tmp[STR_L] = "INSERT INTO ";
strcat(tmp, TBL_CTX);
strcat(tmp, " VALUES(\"");