libdrizzle Public API Documentation

Drizzle Core Interface
[Drizzle Client InterfaceDrizzle Server Interface]

Enumerations

enum  drizzle_options_t { DRIZZLE_NONE = 0, DRIZZLE_ALLOCATED = (1 << 0), DRIZZLE_NON_BLOCKING = (1 << 1), DRIZZLE_AUTO_ALLOCATED = (1 << 2) }

Functions

const char * drizzle_version (void)
drizzle_stdrizzle_create (drizzle_st *drizzle)
drizzle_stdrizzle_clone (drizzle_st *drizzle, drizzle_st *from)
void drizzle_free (drizzle_st *drizzle)
const char * drizzle_error (drizzle_st *drizzle)
int drizzle_errno (drizzle_st *drizzle)
uint16_t drizzle_error_code (drizzle_st *drizzle)
const char * drizzle_sqlstate (drizzle_st *drizzle)
drizzle_options_t drizzle_options (drizzle_st *drizzle)
void drizzle_set_options (drizzle_st *drizzle, drizzle_options_t options)
void drizzle_add_options (drizzle_st *drizzle, drizzle_options_t options)
void drizzle_remove_options (drizzle_st *drizzle, drizzle_options_t options)
void drizzle_set_event_watch (drizzle_st *drizzle, drizzle_event_watch_fn *event_watch, void *event_watch_arg)

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.
drizzle_st* drizzle_create ( drizzle_st drizzle  ) 

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.
drizzle_st* drizzle_clone ( drizzle_st drizzle,
drizzle_st from 
)

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.
void drizzle_free ( drizzle_st drizzle  ) 

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.
int drizzle_errno ( drizzle_st drizzle  ) 

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.
drizzle_options_t drizzle_options ( drizzle_st drizzle  ) 

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.
void drizzle_set_options ( drizzle_st drizzle,
drizzle_options_t  options 
)

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.
void drizzle_add_options ( drizzle_st drizzle,
drizzle_options_t  options 
)

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.
void drizzle_remove_options ( drizzle_st drizzle,
drizzle_options_t  options 
)

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.
void drizzle_set_event_watch ( drizzle_st drizzle,
drizzle_event_watch_fn event_watch,
void *  event_watch_arg 
)

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.

Generated on Mon Sep 28 12:54:04 2009 by  doxygen 1.6.1