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.
Options for drizzle_query_st.
Definition at line 268 of file constants.h.
States for drizle_query_st.
| 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_result_st* drizzle_query | ( | drizzle_con_st * | con, |
| drizzle_result_st * | result, | ||
| const char * | query, | ||
| size_t | size, | ||
| drizzle_return_t * | ret_ptr | ||
| ) |
Send query to server. A drizzle_result_st will be created for the results.
| [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. |
| drizzle_result_st* drizzle_query_str | ( | drizzle_con_st * | con, |
| drizzle_result_st * | result, | ||
| const char * | query, | ||
| drizzle_return_t * | ret_ptr | ||
| ) |
Send query to server, using strlen to get the size of query buffer..
| 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 | ||
| ) |
Send query incrementally.
| 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 | ||
| ) |
Add a query to be run concurrently.
| drizzle_query_st* drizzle_query_create | ( | drizzle_st * | drizzle, |
| drizzle_query_st * | query | ||
| ) |
Initialize a query structure.
| void drizzle_query_free | ( | drizzle_query_st * | query | ) |
Free a query structure.
| void drizzle_query_free_all | ( | drizzle_st * | drizzle | ) |
Free a query structure.
| drizzle_con_st* drizzle_query_con | ( | drizzle_query_st * | query | ) |
Get connection struct for a query.
| void drizzle_query_set_con | ( | drizzle_query_st * | query, |
| drizzle_con_st * | con | ||
| ) |
Set connection struct for a query.
| drizzle_result_st* drizzle_query_result | ( | drizzle_query_st * | query | ) |
Get result struct for a query.
| void drizzle_query_set_result | ( | drizzle_query_st * | query, |
| drizzle_result_st * | result | ||
| ) |
Set result struct for a query.
| char* drizzle_query_string | ( | drizzle_query_st * | query, |
| size_t * | size | ||
| ) |
Get query string for a query.
| void drizzle_query_set_string | ( | drizzle_query_st * | query, |
| const char * | string, | ||
| size_t | size | ||
| ) |
Set query string for a query.
Get options for a query.
| void drizzle_query_set_options | ( | drizzle_query_st * | query, |
| drizzle_query_options_t | options | ||
| ) |
Set options for a query.
| void drizzle_query_add_options | ( | drizzle_query_st * | query, |
| drizzle_query_options_t | options | ||
| ) |
Add options for a query.
| void drizzle_query_remove_options | ( | drizzle_query_st * | query, |
| drizzle_query_options_t | options | ||
| ) |
Remove options for a query.
| void* drizzle_query_context | ( | drizzle_query_st * | query | ) |
Get application context for a query.
| void drizzle_query_set_context | ( | drizzle_query_st * | query, |
| void * | context | ||
| ) |
Set application context for a query.
| void drizzle_query_set_context_free_fn | ( | drizzle_query_st * | query, |
| drizzle_query_context_free_fn * | function | ||
| ) |
Set callback function when the context pointer should be freed.
| drizzle_query_st* drizzle_query_run | ( | drizzle_st * | drizzle, |
| drizzle_return_t * | ret_ptr | ||
| ) |
Run queries concurrently, returning when one is complete.
| drizzle_return_t drizzle_query_run_all | ( | drizzle_st * | drizzle | ) |
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.
| 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 | ||
| ) |
1.7.6.1