Detailed Description
This is the core library instance context that other structs (such as connections) are created from.
There is no locking within a single drizzle_st structure, so for threaded applications you must either ensure isolation in the application or use multiple drizzle_st structures (for example, one for each thread).
Enumeration Type Documentation
Options for drizzle_st.
- Enumerator:
| DRIZZLE_NONE |
|
| DRIZZLE_ALLOCATED |
|
| DRIZZLE_NON_BLOCKING |
|
| DRIZZLE_AUTO_ALLOCATED |
|
Function Documentation
| const char* drizzle_version |
( |
void |
|
) |
|
Get library version string.
- Returns:
- Pointer to static buffer in library that holds the version string.
Initialize a library instance structure.
- Parameters:
-
| drizzle | Caller allocated drizzle structure, or NULL to allocate one. |
- Returns:
- Pointer to an allocated drizzle structure if drizzle parameter was NULL, or the drizzle parameter pointer if it was not NULL.
Clone a library instance structure.
- Parameters:
-
| drizzle | Caller allocated drizzle structure, or NULL to allocate one. |
| from | Drizzle structure to use as a source to clone from. |
- Returns:
- Pointer to an allocated drizzle structure if drizzle parameter was NULL, or the drizzle parameter pointer if it was not NULL.
Free a library instance structure.
- Parameters:
-
| drizzle | Drizzle structure previously initialized with drizzle_create or drizzle_clone. |
| const char* drizzle_error |
( |
drizzle_st * |
drizzle |
) |
|
Return an error string for last library error encountered.
- Parameters:
-
| drizzle | Drizzle structure previously initialized with drizzle_create or drizzle_clone. |
- Returns:
- Pointer to static buffer in library that holds an error string.
Value of errno in the case of a DRIZZLE_RETURN_ERRNO return value.
- Parameters:
-
| drizzle | Drizzle structure previously initialized with drizzle_create or drizzle_clone. |
- Returns:
- An errno value as defined in your system errno.h file.
| uint16_t drizzle_error_code |
( |
drizzle_st * |
drizzle |
) |
|
Get server defined error code for the last result read.
- Parameters:
-
| drizzle | Drizzle structure previously initialized with drizzle_create or drizzle_clone. |
- Returns:
- An error code given back in the server response.
| const char* drizzle_sqlstate |
( |
drizzle_st * |
drizzle |
) |
|
Get SQL state code for the last result read.
- Parameters:
-
| drizzle | Drizzle structure previously initialized with drizzle_create or drizzle_clone. |
- Returns:
- A SQLSTATE code given back in the server response.
Get options for a library instance structure.
- Parameters:
-
| drizzle | Drizzle structure previously initialized with drizzle_create or drizzle_clone. |
- Returns:
- Options set for drizzle struct.
Set options for a library instance structure.
- Parameters:
-
| drizzle | Drizzle structure previously initialized with drizzle_create or drizzle_clone. |
| options | Available options for drizzle structs to set. |
Add options for a library instance structure.
- Parameters:
-
| drizzle | Drizzle structure previously initialized with drizzle_create or drizzle_clone. |
| options | Available options for drizzle structs that should be added. |
Remove options for a library instance structure.
- Parameters:
-
| drizzle | Drizzle structure previously initialized with drizzle_create or drizzle_clone. |
| options | Available options for drizzle structs that should be removed. |
Set custom I/O event callbacks for a drizzle structure.
- Parameters:
-
| drizzle | Drizzle structure previously initialized with drizzle_create or drizzle_clone. |
| event_watch | Callback function to be called for events. |
| event_watch_arg | Argument to pass in with callback function. |