Hoel
C Database abstraction library with json based language
Functions
Escape string functions

Functions

char * h_escape_string (const struct _h_connection *conn, const char *unsafe)
 
char * h_escape_string_with_quotes (const struct _h_connection *conn, const char *unsafe)
 
char * h_escape_string_sqlite (const struct _h_connection *conn, const char *unsafe)
 
char * h_escape_string_with_quotes_sqlite (const struct _h_connection *conn, const char *unsafe)
 
char * h_escape_string_mariadb (const struct _h_connection *conn, const char *unsafe)
 
char * h_escape_string_with_quotes_mariadb (const struct _h_connection *conn, const char *unsafe)
 
char * h_escape_string_pgsql (const struct _h_connection *conn, const char *unsafe)
 
char * h_escape_string_with_quotes_pgsql (const struct _h_connection *conn, const char *unsafe)
 

Detailed Description

Function Documentation

◆ h_escape_string()

char* h_escape_string ( const struct _h_connection conn,
const char *  unsafe 
)

h_escape_string Escapes a string

Parameters
connthe connection to the database
unsafethe string to escape
Returns
a heap-allocated string returned value must be h_free'd after use

h_escape_string Escapes a string returned value must be free'd after use

◆ h_escape_string_mariadb()

char* h_escape_string_mariadb ( const struct _h_connection conn,
const char *  unsafe 
)

escape a string This is an internal function, you should use h_escape_string instead returned value must be h_free'd after use

Parameters
connthe connection to the database
unsafethe string to escape
Returns
a heap-allocated string

◆ h_escape_string_pgsql()

char* h_escape_string_pgsql ( const struct _h_connection conn,
const char *  unsafe 
)

escape a string This is an internal function, you should use h_escape_string instead returned value must be h_free'd after use

Parameters
connthe connection to the database
unsafethe string to escape
Returns
a heap-allocated string

◆ h_escape_string_sqlite()

char* h_escape_string_sqlite ( const struct _h_connection conn,
const char *  unsafe 
)

escape a string returned value must be h_free'd after use This is an internal function, you should use h_escape_string instead

Parameters
connthe connection to the database
unsafethe string to escape
Returns
a heap-allocated string

◆ h_escape_string_with_quotes()

char* h_escape_string_with_quotes ( const struct _h_connection conn,
const char *  unsafe 
)

h_escape_string_with_quotes Escapes a string and returns it ready to be inserted in the query

Parameters
connthe connection to the database
unsafethe string to escape
Returns
a heap-allocated string returned value must be h_free'd after use

h_escape_string_with_quotes Escapes a string and returns it ready to be inserted in the query returned value must be h_h_free'd after use

◆ h_escape_string_with_quotes_mariadb()

char* h_escape_string_with_quotes_mariadb ( const struct _h_connection conn,
const char *  unsafe 
)

escape a string This is an internal function, you should use h_escape_string_with_quotes instead returned value must be h_free'd after use

Parameters
connthe connection to the database
unsafethe string to escape
Returns
a heap-allocated string

◆ h_escape_string_with_quotes_pgsql()

char* h_escape_string_with_quotes_pgsql ( const struct _h_connection conn,
const char *  unsafe 
)

escape a string This is an internal function, you should use h_escape_string_with_quotes instead returned value must be h_free'd after use

Parameters
connthe connection to the database
unsafethe string to escape
Returns
a heap-allocated string

◆ h_escape_string_with_quotes_sqlite()

char* h_escape_string_with_quotes_sqlite ( const struct _h_connection conn,
const char *  unsafe 
)

escape a string returned value must be h_free'd after use This is an internal function, you should use h_escape_string_with_quotes instead

Parameters
connthe connection to the database
unsafethe string to escape
Returns
a heap-allocated string