aboutsummaryrefslogtreecommitdiffstats
path: root/src/dblayer.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/dblayer.c
parent387b31f293347a8bc05dbd4c5f2d063a7b8bdba9 (diff)
downloadck-f30142e0cbe7ff6dc4339682f66da72cb5fd9428.tar.gz
ck-f30142e0cbe7ff6dc4339682f66da72cb5fd9428.tar.bz2
ck-f30142e0cbe7ff6dc4339682f66da72cb5fd9428.zip
Replace form_query with fq
Diffstat (limited to 'src/dblayer.c')
-rw-r--r--src/dblayer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dblayer.c b/src/dblayer.c
index 5499cd8..94af089 100644
--- a/src/dblayer.c
+++ b/src/dblayer.c
@@ -36,7 +36,7 @@ int db_exists(const UserOpt *opt) {
/* check if db has the correct tables */
static int check_initialized_DB(sqlite3 *db) {
char sql[STR_M] = "";
- dbh_form_query_select_all_tables(sql);
+ dbh_fq_select_all_tables(sql);
sqlite3_stmt *stmt;
sqlite3_prepare_v2(db, sql, (int)strlen(sql), &stmt, NULL);
@@ -100,7 +100,7 @@ int get_program_id(DB *db, const char* name) {
int rc;
char sql[STR_M] = "";
- dhb_form_query_find_program(sql);
+ dhb_fq_find_program(sql);
rc = sqlite3_prepare_v2(db->ptr, sql, -1, &stmt, 0);
if (rc != SQLITE_OK) {
@@ -129,7 +129,7 @@ int get_config_id(DB *db, const char* path) {
int rc;
char sql[STR_M] = "";
- dhb_form_query_find_config(sql);
+ dhb_fq_find_config(sql);
rc = sqlite3_prepare_v2(db->ptr, sql, -1, &stmt, 0);
if (rc != SQLITE_OK) {
@@ -162,7 +162,7 @@ int program_has_primary_config(DB *db, const int pid, char *ret, int *sec) {
strcat(selection, ", ");
strcat(selection, COL_CONFIG_SECRET);
- dbh_form_query_select_from_joined_eq(sql, selection, condition);
+ dbh_fq_select_from_joined_eq(sql, selection, condition);
rc = sqlite3_prepare_v2(db->ptr, sql, -1, &stmt, 0);
if (rc != SQLITE_OK) {
@@ -193,7 +193,7 @@ int get_program_relations(DB *db, int pid) {
int rc;
char sql[STR_M] = "";
- dbh_form_query_count_program_relations(sql);
+ dbh_fq_count_program_relations(sql);
rc = sqlite3_prepare_v2(db->ptr, sql, -1, &stmt, 0);
if (rc != SQLITE_OK) {
@@ -227,7 +227,7 @@ int get_pid_from_cid(DB *db, int cid) {
int rc;
char sql[STR_M] = "";
- dbh_form_query_get_pid_from_cid(sql);
+ dbh_fq_get_pid_from_cid(sql);
rc = sqlite3_prepare_v2(db->ptr, sql, -1, &stmt, 0);
if (rc != SQLITE_OK) {
@@ -279,7 +279,7 @@ int get_program_paths(DB *db, cklist *ckl, const char* pName, int bname, int att
strcat(condition, COL_PROGRAM_ID);
char sql[STR_L] = "";
- dbh_form_query_select_from_joined_eq(sql, selection, condition);
+ dbh_fq_select_from_joined_eq(sql, selection, condition);
rc = sqlite3_prepare_v2(db->ptr, sql, -1, &stmt, 0);
sqlite3_bind_int(stmt, 1, pid);
@@ -321,7 +321,7 @@ int secret_enabled(DB *db) {
int rc;
char sql[STR_M] = "";
- dbh_form_query_secret_enabled(sql);
+ dbh_fq_secret_enabled(sql);
rc = sqlite3_prepare_v2(db->ptr, sql, -1, &stmt, 0);
if (rc != SQLITE_OK) {