2.1. Driver Infrastructure Functions

2.1.1. dbd_register_driver

void dbd_register_driver(const dbi_info_t **_driver_info, const char ***_custom_functions, const char ***_reserved_words)

This is the first function called after the driver module is loaded into memory. It passes back meta-information back to libdbi through the pointers passed as arguments.

2.1.2. dbd_initialize

int dbd_initialize(dbi_driver_t *driver)

Performs any database-specific server initialization. This is called right after dbd_register_driver().

2.1.3. dbd_connect

int dbd_connect(dbi_conn_t *conn)

Connects to the database, setting the connection's DB-specific connection handle and current database name. Connection parameters are already filled through the connection's option settings. The standard options that all drivers must recognize (if applicable) are: host, username, password, dbname, and port. Any driver-specific functions must be prefixed with the name of the driver and an underscore, such as "mysql_compression".

2.1.4. dbd_disconnect

int dbd_disconnect(dbi_conn_t *conn)

Disconnects from the database server.

2.1.5. dbd_quote_string

int dbd_quote_string(dbi_driver_t *driver, const char *orig, char *dest)

Given a string, wrap quotes around that string and escape any characters that the database server needs escaped.

2.1.6. dbd_geterror

int dbd_geterror(dbi_conn_t *conn, int *errno, char **errstr)

Retrieves and stores error information, in numeric and/or string format.