Skip to content

Commit

Permalink
Set h_exec_query_sqlite as a #define
Browse files Browse the repository at this point in the history
  • Loading branch information
babelouest committed Mar 25, 2022
1 parent 41babac commit b0ababd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
2 changes: 1 addition & 1 deletion include/hoel.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ long long int h_last_insert_id_sqlite(const struct _h_connection * conn);
* @param query the SQL query to execute
* @return H_OK on success
*/
int h_exec_query_sqlite(const struct _h_connection * conn, const char * query);
#define h_exec_query_sqlite(conn, query) h_execute_query_sqlite(conn, query)

/**
* h_execute_query_sqlite
Expand Down
18 changes: 0 additions & 18 deletions src/hoel-sqlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,6 @@ int h_select_query_sqlite(const struct _h_connection * conn, const char * query,
}
}

/**
* h_exec_query_sqlite
* Execute a query on a sqlite connection
* Should not be executed by the user because all parameters are supposed to be correct
* No result is returned, useful for single INSERT, UPDATE or DELETE statements
* return H_OK on success
*/
int h_exec_query_sqlite(const struct _h_connection * conn, const char * query) {
return h_execute_query_sqlite(conn, query);
}

/**
* h_execute_query_sqlite
* Execute a query on a sqlite connection
Expand Down Expand Up @@ -351,13 +340,6 @@ long long int h_last_insert_id_sqlite(const struct _h_connection * conn) {
return 0;
}

int h_exec_query_sqlite(const struct _h_connection * conn, const char * query) {
UNUSED(conn);
UNUSED(query);
y_log_message(Y_LOG_LEVEL_ERROR, "Hoel was not compiled with SQLite backend");
return H_ERROR;
}

int h_execute_query_sqlite(const struct _h_connection * conn, const char * query) {
UNUSED(conn);
UNUSED(query);
Expand Down

0 comments on commit b0ababd

Please sign in to comment.