|
| drizzle_result_st * | drizzle_query (drizzle_con_st *con, drizzle_result_st *result, const char *query, size_t size, drizzle_return_t *ret_ptr) |
| |
| drizzle_result_st * | drizzle_query_str (drizzle_con_st *con, drizzle_result_st *result, const char *query, drizzle_return_t *ret_ptr) |
| |
| drizzle_result_st * | drizzle_query_inc (drizzle_con_st *con, drizzle_result_st *result, const char *query, size_t size, size_t total, drizzle_return_t *ret_ptr) |
| |
| drizzle_query_st * | drizzle_query_add (drizzle_st *drizzle, drizzle_query_st *query, drizzle_con_st *con, drizzle_result_st *result, const char *query_string, size_t size, drizzle_query_options_t options, void *context) |
| |
| drizzle_query_st * | drizzle_query_create (drizzle_st *drizzle, drizzle_query_st *query) |
| |
| void | drizzle_query_free (drizzle_query_st *query) |
| |
| void | drizzle_query_free_all (drizzle_st *drizzle) |
| |
| drizzle_con_st * | drizzle_query_con (drizzle_query_st *query) |
| |
| void | drizzle_query_set_con (drizzle_query_st *query, drizzle_con_st *con) |
| |
| drizzle_result_st * | drizzle_query_result (drizzle_query_st *query) |
| |
| void | drizzle_query_set_result (drizzle_query_st *query, drizzle_result_st *result) |
| |
| char * | drizzle_query_string (drizzle_query_st *query, size_t *size) |
| |
| void | drizzle_query_set_string (drizzle_query_st *query, const char *string, size_t size) |
| |
| drizzle_query_options_t | drizzle_query_options (drizzle_query_st *query) |
| |
| void | drizzle_query_set_options (drizzle_query_st *query, drizzle_query_options_t options) |
| |
| void | drizzle_query_add_options (drizzle_query_st *query, drizzle_query_options_t options) |
| |
| void | drizzle_query_remove_options (drizzle_query_st *query, drizzle_query_options_t options) |
| |
| void * | drizzle_query_context (drizzle_query_st *query) |
| |
| void | drizzle_query_set_context (drizzle_query_st *query, void *context) |
| |
| void | drizzle_query_set_context_free_fn (drizzle_query_st *query, drizzle_query_context_free_fn *function) |
| |
| drizzle_query_st * | drizzle_query_run (drizzle_st *drizzle, drizzle_return_t *ret_ptr) |
| |
| drizzle_return_t | drizzle_query_run_all (drizzle_st *drizzle) |
| |
| size_t | drizzle_escape_string (char *to, const char *from, size_t from_size) |
| |
| size_t | drizzle_hex_string (char *to, const char *from, size_t from_size) |
| |
These functions are used to issue queries on a connection. Single queries are made using the drizzle_query function, or you can queue multiple queries and run them concurrently using the other query functions.
◆ drizzle_query_options_t
Options for drizzle_query_st.
| Enumerator |
|---|
| DRIZZLE_QUERY_ALLOCATED | |
Definition at line 268 of file constants.h.
◆ drizzle_query_state_t
States for drizle_query_st.
| Enumerator |
|---|
| DRIZZLE_QUERY_STATE_INIT | |
| DRIZZLE_QUERY_STATE_QUERY | |
| DRIZZLE_QUERY_STATE_RESULT | |
| DRIZZLE_QUERY_STATE_DONE | |
Definition at line 277 of file constants.h.
◆ drizzle_query()
Send query to server. A drizzle_result_st will be created for the results.
- Parameters
-
| [in] | con | connection to use to send the query. |
| [in,out] | result | pointer to an unused structure that will be used for the results, or NULL to allocate a new structure. |
| [in] | query | query string to send. |
| [in] | size | length of the query string in bytes. |
| [out] | ret_ptr | pointer to the result code. |
- Returns
- result, a pointer to the newly allocated result structure, or NULL if the allocation failed.
◆ drizzle_query_str()
Send query to server, using strlen to get the size of query buffer..
◆ drizzle_query_inc()
Send query incrementally.
◆ drizzle_query_add()
Add a query to be run concurrently.
◆ drizzle_query_create()
Initialize a query structure.
◆ drizzle_query_free()
◆ drizzle_query_free_all()
| void drizzle_query_free_all |
( |
drizzle_st * | drizzle | ) |
|
◆ drizzle_query_con()
Get connection struct for a query.
◆ drizzle_query_set_con()
Set connection struct for a query.
◆ drizzle_query_result()
Get result struct for a query.
◆ drizzle_query_set_result()
Set result struct for a query.
◆ drizzle_query_string()
Get query string for a query.
◆ drizzle_query_set_string()
| void drizzle_query_set_string |
( |
drizzle_query_st * | query, |
|
|
const char * | string, |
|
|
size_t | size ) |
Set query string for a query.
◆ drizzle_query_options()
◆ drizzle_query_set_options()
◆ drizzle_query_add_options()
◆ drizzle_query_remove_options()
Remove options for a query.
◆ drizzle_query_context()
Get application context for a query.
◆ drizzle_query_set_context()
Set application context for a query.
◆ drizzle_query_set_context_free_fn()
Set callback function when the context pointer should be freed.
◆ drizzle_query_run()
Run queries concurrently, returning when one is complete.
◆ drizzle_query_run_all()
Run queries until they are all complete. Returns DRIZZLE_RETURN_OK if all queries complete, even if some return errors. This returns immediately if some other error occurs, leaving some queries unprocessed. You must call drizzle_result_error_code() to check if each query succeeded.
◆ drizzle_escape_string()
| size_t drizzle_escape_string |
( |
char * | to, |
|
|
const char * | from, |
|
|
size_t | from_size ) |
◆ drizzle_hex_string()
| size_t drizzle_hex_string |
( |
char * | to, |
|
|
const char * | from, |
|
|
size_t | from_size ) |