52 #define HOEL_DB_TYPE_SQLITE 0
53 #define HOEL_DB_TYPE_MARIADB 1
54 #define HOEL_DB_TYPE_PGSQL 2
56 #define HOEL_COL_TYPE_INT 0
57 #define HOEL_COL_TYPE_DOUBLE 1
58 #define HOEL_COL_TYPE_TEXT 2
59 #define HOEL_COL_TYPE_DATE 3
60 #define HOEL_COL_TYPE_BLOB 4
61 #define HOEL_COL_TYPE_BOOL 5
62 #define HOEL_COL_TYPE_NULL 5
66 #define H_ERROR_PARAMS 2
67 #define H_ERROR_CONNECTION 3
68 #define H_ERROR_QUERY 4
69 #define H_ERROR_MEMORY 99
71 #define H_OPTION_NONE 0x0000
72 #define H_OPTION_SELECT 0x0001
73 #define H_OPTION_EXEC 0x0010
366 int h_select(
const struct _h_connection * conn,
const json_t * j_query, json_t ** j_result,
char ** generated_query);
623 struct _h_connection *
h_connect_mariadb(
const char * host,
const char * user,
const char * passwd,
const char * db,
const unsigned int port,
const char * unix_socket);
char * h_escape_string_with_quotes_pgsql(const struct _h_connection *conn, const char *unsafe)
Definition: hoel-pgsql.c:428
char * h_escape_string_with_quotes_sqlite(const struct _h_connection *conn, const char *unsafe)
Definition: hoel-sqlite.c:342
char * h_escape_string(const struct _h_connection *conn, const char *unsafe)
Definition: hoel.c:73
char * h_escape_string_mariadb(const struct _h_connection *conn, const char *unsafe)
Definition: hoel-mariadb.c:453
char * h_escape_string_with_quotes(const struct _h_connection *conn, const char *unsafe)
Definition: hoel.c:103
char * h_escape_string_with_quotes_mariadb(const struct _h_connection *conn, const char *unsafe)
Definition: hoel-mariadb.c:460
char * h_escape_string_pgsql(const struct _h_connection *conn, const char *unsafe)
Definition: hoel-pgsql.c:421
char * h_escape_string_sqlite(const struct _h_connection *conn, const char *unsafe)
Definition: hoel-sqlite.c:335
int h_query_insert(const struct _h_connection *conn, const char *query)
Definition: hoel.c:314
int h_query_update(const struct _h_connection *conn, const char *query)
Definition: hoel.c:371
int h_clean_data_full(struct _h_data *data)
Definition: hoel.c:466
int h_query_select(const struct _h_connection *conn, const char *query, struct _h_result *result)
Definition: hoel.c:397
int h_clean_data(struct _h_data *data)
Definition: hoel.c:445
int h_clean_result(struct _h_result *result)
Definition: hoel.c:422
struct _h_data * h_get_mariadb_value(const char *value, const unsigned long length, const int m_type)
Definition: hoel-mariadb.c:489
int h_execute_query_pgsql(const struct _h_connection *conn, const char *query, struct _h_result *result)
Definition: hoel-pgsql.c:441
int h_execute_query(const struct _h_connection *conn, const char *query, struct _h_result *result, int options)
Definition: hoel.c:138
int h_query_delete(const struct _h_connection *conn, const char *query)
Definition: hoel.c:384
int h_select_query_sqlite(const struct _h_connection *conn, const char *query, struct _h_result *result)
struct _h_data * h_query_last_insert_id(const struct _h_connection *conn)
Definition: hoel.c:327
int h_execute_query_mariadb(const struct _h_connection *conn, const char *query, struct _h_result *result)
Definition: hoel-mariadb.c:473
void h_close_mariadb(struct _h_connection *conn)
Definition: hoel-mariadb.c:448
int h_clean_connection(struct _h_connection *conn)
Definition: hoel.c:633
struct _h_connection * h_connect_pgsql(const char *conninfo)
Definition: hoel-pgsql.c:410
struct _h_connection * h_connect_sqlite(const char *db_path)
Definition: hoel-sqlite.c:324
void h_close_sqlite(struct _h_connection *conn)
Definition: hoel-sqlite.c:330
int h_close_db(struct _h_connection *conn)
Definition: hoel.c:40
struct _h_connection * h_connect_mariadb(const char *host, const char *user, const char *passwd, const char *db, const unsigned int port, const char *unix_socket)
Definition: hoel-mariadb.c:437
void h_close_pgsql(struct _h_connection *conn)
Definition: hoel-pgsql.c:416
int h_execute_query_json_mariadb(const struct _h_connection *conn, const char *query, json_t **j_result)
Definition: hoel-mariadb.c:481
int h_execute_query_json_pgsql(const struct _h_connection *conn, const char *query, json_t **j_result)
Definition: hoel-pgsql.c:449
long long int h_last_insert_id_sqlite(const struct _h_connection *conn)
Definition: hoel-sqlite.c:349
int h_execute_query_sqlite(const struct _h_connection *conn, const char *query)
Definition: hoel-sqlite.c:355
int h_delete(const struct _h_connection *conn, const json_t *j_query, char **generated_query)
Definition: hoel-simple-json.c:750
char * h_build_where_clause(const struct _h_connection *conn, const char *pattern,...)
Definition: hoel-simple-json.c:795
long long int h_last_insert_id_pgsql(const struct _h_connection *conn)
Definition: hoel-pgsql.c:435
json_t * h_last_insert_id(const struct _h_connection *conn)
Definition: hoel-simple-json.c:662
int h_select(const struct _h_connection *conn, const json_t *j_query, json_t **j_result, char **generated_query)
Definition: hoel-simple-json.c:458
int h_exec_query_sqlite(const struct _h_connection *conn, const char *query)
long long int h_last_insert_id_mariadb(const struct _h_connection *conn)
Definition: hoel-mariadb.c:467
int h_execute_query_json(const struct _h_connection *conn, const char *query, json_t **j_result)
Definition: hoel.c:175
int h_insert(const struct _h_connection *conn, const json_t *j_query, char **generated_query)
Definition: hoel-simple-json.c:592
int h_execute_query_json_sqlite(const struct _h_connection *conn, const char *query, json_t **j_result)
Definition: hoel-sqlite.c:362
int h_update(const struct _h_connection *conn, const json_t *j_query, char **generated_query)
Definition: hoel-simple-json.c:700
int h_query_select_json(const struct _h_connection *conn, const char *query, json_t **j_result)
Definition: hoel.c:410
void h_free(void *data)
Definition: hoel.c:32
int type
Definition: hoel.h:88
void * connection
Definition: hoel.h:89
int type
Definition: hoel.h:133
void * t_data
Definition: hoel.h:134
unsigned int nb_rows
Definition: hoel.h:141
struct _h_data ** data
Definition: hoel.h:143
unsigned int nb_columns
Definition: hoel.h:142
size_t length
Definition: hoel.h:125
void * value
Definition: hoel.h:126
struct tm value
Definition: hoel.h:110
double value
Definition: hoel.h:103
long long int value
Definition: hoel.h:96
size_t length
Definition: hoel.h:117
char * value
Definition: hoel.h:118