*

NAME dbi_initialize
	PROTO int dbi_initialize(const char *driverdir)
	DESC
	Locates all available shared modules (drivers) and loads them into memory.
	ENDDESC
	ARG driverdir The directory to search for drivers. If NULL, DBI_DRIVER_DIR (defined at compile time) will be used instead.
	RET The number of drivers successfully loaded, or -1 if there was an error.

*

NAME dbi_shutdown
	PROTO void dbi_shutdown()
	DESC
	Frees all loaded drivers and terminates the DBI system. You should close each connection you opened before shutting down, but libdbi will clean up after you if you don't.
	ENDDESC
	RET 

*

NAME dbi_version
	PROTO const char *dbi_version()
	DESC
	Requests the version of libdbi. The calling program must not attempt to free the returned string.
	ENDDESC
	RET A string containing the library's name and version.

*

NAME dbi_driver_list
	PROTO dbi_driver dbi_driver_list(dbi_driver Current)
	DESC
	Enumerates all loaded drivers. If Current is NULL, the first available driver will be returned. If Current is a valid driver, the next available driver will be returned.
	ENDDESC
	ARG Current The current driver in the list of drivers.
	RET The next available driver, or NULL if there is an error or no more are available.

*

NAME dbi_driver_open
	PROTO dbi_driver dbi_driver_open(const char *name)
	DESC
	Locate the driver with the specified name.
	ENDDESC
	ARG name The name of the driver to open.
	RET The requested driver, or NULL if there is an error or it is not found.

*

NAME dbi_driver_is_reserved_word
	PROTO int dbi_driver_is_reserved_word(dbi_driver Driver, const char *word)
	DESC
	Looks for the specified word in the list of reserved words. The result of this function may vary between databases. Case does not matter.
	ENDDESC
	ARG Driver The target driver.
	ARG word The word to check against the reserved word list.
	RET -1 if an error occurs, 0 if the word is not reserved, 1 otherwise.

*

NAME dbi_driver_specific_function
	PROTO void *dbi_driver_specific_function(dbi_driver Driver, const char *name)
	DESC
	Returns a function pointer to the specifed custom function. This can be used to access database-specific functionality, but it will restrict your code to one particular database, lessening the benefits of using libdbi.
	ENDDESC
	ARG Driver The target driver.
	ARG name The name of the custom function.
	RET If the custom function is found, a pointer to that function. If not, returns NULL.

*

NAME dbi_driver_quote_string
	PROTO int dbi_driver_quote_string(dbi_driver Driver, char **orig)
	DESC
	Encloses the target string in the types of quotes that the database expects, and escapes any special characters. The original string will be freed and will point to a newly allocated one (which you still must free on your own).
	ENDDESC
	ARG Driver The target driver.
	ARG orig A pointer to the string to quote and escape.
	RET The new string's length.

*

NAME dbi_driver_get_name
	PROTO const char *dbi_driver_get_name(dbi_driver Driver)
	DESC
	Requests the name of the specified driver. The calling program must not attempt to free the returned string.
	ENDDESC
	ARG Driver The target driver.
	RET A string containing the driver's name.

*

NAME dbi_driver_get_filename
	PROTO const char *dbi_driver_get_filename(dbi_driver Driver)
	DESC
	Requests the filename of the specified driver. The calling program must not attempt to free the returned string.
	ENDDESC
	ARG Driver The target driver.
	RET A string containing the driver's full path and file name.

*

NAME dbi_driver_get_description
	PROTO const char *dbi_driver_get_description(dbi_driver Driver)
	DESC
	Requests a description of the specified driver. The calling program must not attempt to free the returned string.
	ENDDESC
	ARG Driver The target driver.
	RET A string containing the driver's description. It will be one or two short sentences with no newlines.

*

NAME dbi_driver_get_maintainer
	PROTO const char *dbi_driver_get_maintainer(dbi_driver Driver)
	DESC
	Requests the maintainer of the specified driver. The calling program must not attempt to free the returned string.
	ENDDESC
	ARG Driver The target driver.
	RET A string containing the driver maintainer's full name and email address.

*

NAME dbi_driver_get_url
	PROTO const char *dbi_driver_get_url(dbi_driver Driver)
	DESC
	Requests the maintainer's URL for the specified driver. This is useful for drivers maintained by a third party. The calling program must not attempt to free the returned string.
	ENDDESC
	ARG Driver The target driver.
	RET 

*

NAME dbi_driver_get_version
	PROTO const char *dbi_driver_get_version(dbi_driver Driver)
	DESC
	Requests the version of the specified driver. The calling program must not attempt to free the returned string.
	ENDDESC
	ARG Driver The target driver.
	RET A string containing the driver's version.

*

NAME dbi_driver_get_date_compiled
	PROTO const char *dbi_driver_get_date_compiled(dbi_driver Driver)
	DESC
	Requests the compilation date of the specified driver. The calling program must not attempt to free the returned string.
	ENDDESC
	ARG Driver The target driver.
	RET A string containing the date the driver was compiled.

*

NAME dbi_conn_new
	PROTO dbi_conn dbi_conn_new(const char *name)
	DESC
	Creates a connection instance of the driver specified by "name". This is a shortcut for calling dbi_driver_open() and passing the result to dbi_conn_open().
	ENDDESC
	ARG name The name of the desired driver.
	RET A connection instance of the specified driver, or NULL if there was an error.

*

NAME dbi_conn_open
	PROTO dbi_conn dbi_conn_open(dbi_driver Driver)
	DESC
	Creates a connection instance of the specified driver. This connection can be used to perform queries and set options.
	ENDDESC
	ARG Driver The target driver.
	RET A connection instance of the specified driver, or NULL if there was an error.

*

NAME dbi_conn_get_driver
	PROTO dbi_driver dbi_conn_get_driver(dbi_conn Conn)
	DESC
	Returns the driver type of the specified connection.
	ENDDESC
	ARG Conn The target connection.
	RET The driver type of the target connection.

*

NAME dbi_conn_set_option
	PROTO int dbi_conn_set_option(dbi_conn Conn, const char *key, char *value)
	DESC
	Sets a specified connection option to a string value.
	ENDDESC
	ARG Conn The target connection.
	ARG key The name of the target setting. Must only contain alphanumerics and the underscore character.
	ARG value The string value of the target setting.
	RET -1 on error, 0 on success.

*

NAME dbi_conn_set_option_numeric
	PROTO int dbi_conn_set_option_numeric(dbi_conn Conn, const char *key, int value)
	DESC
	Sets a specified connection option to a numeric value.
	ENDDESC
	ARG Conn The target connection.
	ARG key The name of the target setting. Must only contain alphanumerics and the underscore character.
	ARG value The numeric value of the target setting.
	RET -1 on error, 0 on success.

*

NAME dbi_conn_get_option
	PROTO const char *dbi_conn_get_option(dbi_conn Conn, const char *key)
	DESC
	Retrieves the string value of the specified option set for a connection.
	ENDDESC
	ARG Conn The target connection.
	ARG key The name of the target setting.
	RET A read-only string with the setting, or NULL if it is not available.

*

NAME dbi_conn_get_option_numeric
	PROTO int dbi_conn_get_option_numeric(dbi_conn Conn, const char *key)
	DESC
	Retrieves the integer value of the specified option set for a connection.
	ENDDESC
	ARG Conn The target connection.
	ARG key The name of the target setting.
	RET The value of the setting, or -1 if it is not available.

*

NAME dbi_conn_get_option_list
	PROTO const char *dbi_conn_get_option_list(dbi_conn Conn, const char *current)
	DESC
	Enumerates the list of available options for a connection. If current is NULL, the first available option will be returned. If current is a valid option name, the next available option will be returned.
	ENDDESC
	ARG Conn The target connection.
	ARG current The key name of the target option.
	RET The key name of the next option, or NULL if there was an error or there are no more options.

*

NAME dbi_conn_clear_option
	PROTO void dbi_conn_clear_option(dbi_conn Conn, const char *key)
	DESC
	Removes the target option setting from a connection.
	ENDDESC
	ARG Conn The target connection.
	ARG key The name of the target setting.
	RET 

*

NAME dbi_conn_clear_options
	PROTO void dbi_conn_clear_options(dbi_conn Conn)
	DESC
	Removes all option settings from a connection.
	ENDDESC
	ARG Conn The target connection.
	RET 

*

NAME dbi_conn_close
	PROTO void dbi_conn_close(dbi_conn Conn)
	DESC
	Disconnects the specified connection connection from the database and cleans up the connection session.
	ENDDESC
	ARG Conn The target connection.
	RET 

*

NAME dbi_conn_error
	PROTO int dbi_conn_error(dbi_conn Conn, const char **errmsg_dest)
	DESC
	Returns a formatted message with the error number and description resulting from the previous database operation.
	ENDDESC
	ARG Conn The target connection.
	ARG errmsg_dest The target string pointer, which will point to the error message. If NULL, no error message will be created, but the error number will still be returned. This string is managed by libdbi, so it must not be modified or freed.
	RET The error number of the most recent database operation if it resulted in an error. If not, this will return -1.

*

NAME dbi_conn_error_handler
	PROTO void dbi_conn_error_handler(dbi_conn Conn, dbi_conn_error_handler_func function, void *user_argument)
	DESC-VERBATIM
	<Para>
		Registers an error handler callback to be triggered whenever the database encounters an error. The callback function should perform as little work as possible, since the state in which it is called can be uncertain. The actual function declaration must accept two parameters (and return nothing):
	</Para>
	<ItemizedList>
		<ListItem><Para>dbi_conn Conn: the connection object that triggered the error, from which dbi_conn_error() can be called, and</Para></ListItem>
		<ListItem><Para>void *user_argument: a pointer to whatever data (if any) was registered along with the handler.</Para></ListItem>
	</ItemizedList>
	<Para>
		To remove the error handler callback, specify NULL as the function and user_argument.
	</Para>
	ENDDESC
	ARG Conn The target connection.
	ARG function A pointer to the function to call when the error handler should be triggered.
	ARG user_argument Any data to pass along to the function when it is triggered. Set to NULL if unused.
	RET 

*

NAME dbi_conn_connect
	PROTO int dbi_conn_connect(dbi_conn Conn)
	DESC
	Connects to the database using the options (host, username, password, port, (etc.) set with dbi_set_option() and dbi_set_option_numeric().  See the documentation for each specific database driver for the options it recognizes and requires.
	ENDDESC
	ARG Conn The target connection.
	RET -1 on failure, zero on success.

*

NAME dbi_conn_get_socket
	PROTO int dbi_conn_get_socket(dbi_conn Conn)
	DESC
	Obtain the file descriptor number for the backend connection socket.
	ENDDESC
	ARG Conn The target connection
	RET -1 on failure, the file descriptor number on success

*

NAME dbi_conn_get_db_list
	PROTO dbi_result dbi_conn_get_db_list(dbi_conn Conn, const char *pattern)
	DESC
	Queries the list of available databases on the server.
	ENDDESC
	ARG Conn The target connection.
	ARG pattern A string pattern that each name must match.
	RET A query result object, which will contain database names in the first (zeroth) field (for use with the by-index field functions).

*

NAME dbi_conn_get_table_list
	PROTO dbi_result dbi_conn_get_table_list(dbi_conn Conn, const char *db, const char *pattern)
	DESC
	Queries the list of available tables in a particular database.
	ENDDESC
	ARG Conn The target connection.
	ARG db The target database name.
	ARG pattern A string pattern that each name must match.
	RET A query result object, which will contain table names in the first (zeroth) field (for use with the by-index field functions).

*

NAME dbi_conn_query
	PROTO dbi_result dbi_conn_query(dbi_conn Conn, const char *formatstr, ...)
	DESC
	Execute the specified SQL query statement.
	ENDDESC
	ARG Conn The target connection.
	ARG formatstr The format string for the SQL statement. It uses the same format as printf().
	ARG (...) Any variables that correspond to the printf-like format string.
	RET A query result object, or NULL if there was an error.

*

NAME dbi_conn_query_null
	PROTO dbi_result dbi_conn_query_null(dbi_conn Conn, const unsigned char *statement, unsigned long st_length)
	DESC
	Execute the specified SQL query statement, which may contain valid NULL characters.
	ENDDESC
	ARG Conn The target connection.
	ARG statement The SQL statement, which may contain binary data.
	ARG st_length The number of characters in the non-null-terminated statement string.
	RET A query result object, or NULL if there was an error.

*

NAME dbi_conn_select_db
	PROTO int dbi_conn_select_db(dbi_conn Conn, const char *db)
	DESC
	Switches to a different database on the server.
	ENDDESC
	ARG Conn The target connection.
	ARG db The target database name.
	RET -1 on failure, zero on success.

*

NAME dbi_result_get_conn
	PROTO dbi_conn dbi_result_get_conn(dbi_result Result)
	DESC
	Returns the connection belonging to the specified result object.
	ENDDESC
	ARG Result The target query result.
	RET The connection belonging to the target query result.

*

NAME dbi_result_free
	PROTO int dbi_result_free(dbi_result Result)
	DESC
	Frees the result's query, disables all stored field bindings, and releases internally stored variables.
	ENDDESC
	ARG Result The target query result.
	RET -1 on failure, zero on success.

*

NAME dbi_result_seek_row
	PROTO int dbi_result_seek_row(dbi_result Result, unsigned int row)
	DESC
	Jump to a specific row in a result set.
	ENDDESC
	ARG Result The target query result.
	ARG row The ordinal number of the row to seek to. The first row is at position 1, not zero.
	RET The row number that was fetched, or 0 if there is an error.

*

NAME dbi_result_first_row
	PROTO int dbi_result_first_row(dbi_result Result)
	DESC
	Jump to the first row in a result set.
	ENDDESC
	ARG Result The target query result.
	RET The row number that was fetched, or 0 if there is an error.

*

NAME dbi_result_last_row
	PROTO int dbi_result_last_row(dbi_result Result)
	DESC
	Jump to the last row in a result set.
	ENDDESC
	ARG Result The target query result.
	RET The row number that was fetched, or 0 if there is an error.

*

NAME dbi_result_prev_row
	PROTO int dbi_result_prev_row(dbi_result Result)
	DESC
	Jump to the previous row in a result set.
	ENDDESC
	ARG Result The target query result.
	RET The row number that was fetched, or 0 if there is an error.

*

NAME dbi_result_next_row
	PROTO int dbi_result_next_row(dbi_result Result)
	DESC
	Jump to the next row in a result set.
	ENDDESC
	ARG Result The target query result.
	RET The row number that was fetched, or 0 if there is an error.

*

NAME dbi_result_get_numrows
	PROTO unsigned int dbi_result_get_numrows(dbi_result Result)
	DESC
	Returns the number of rows in the specified result set.
	ENDDESC
	ARG Result The target query result.
	RET The number of rows in the result set.

*

NAME dbi_result_get_numrows_affected
	PROTO unsigned int dbi_result_get_numrows_affected(dbi_result Result)
	DESC
	Returns the number of rows in the specified result set that were actually modified. Note that not all database servers support this, in which case it will always be zero. See the documentation for each specific driver for details.
	ENDDESC
	ARG Result The target query result.
	RET The number of modified rows in the result set.

*

NAME dbi_result_get_field_size
	PROTO unsigned int dbi_result_get_field_size(dbi_result Result, const char *fieldname)
	DESC
	Returns the size in bytes of the value stored in the specified field. This is especially useful for string and binary data fields, which may have a dynamic size.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the target field.
	RET The size in bytes of the target field data.

*

NAME dbi_result_get_field_size_idx
	PROTO unsigned int dbi_result_get_field_size_idx(dbi_result Result, unsigned int idx)
	DESC
	Returns the size in bytes of the value stored in the specified field. This is especially useful for string and binary data fields, which may have a dynamic size.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The size in bytes of the target field data.

*

NAME dbi_result_get_field_length
	PROTO unsigned int dbi_result_get_field_length(dbi_result Result, const char *fieldname)
	DESC
	Returns the length in bytes of the value stored in the specified field. This is always one less than the size, and is probably only useful for fields containing strings.	
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the target field.
	RET The length in bytes of the target field data.

*

NAME dbi_result_get_field_length_idx
	PROTO unsigned int dbi_result_get_field_length_idx(dbi_result Result, unsigned int idx)
	DESC
	Returns the length in bytes of the value stored in the specified field. This is always one less than the size, and is probably only useful for fields containing strings.	
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The length in bytes of the target field data.

*

NAME dbi_result_get_field_idx
	PROTO int dbi_result_get_field_idx(dbi_result Result, const char *fieldname)
	DESC
	Given a field's name, return that field's numeric index.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the target field.
	RET The index (starting at 1) of the target field.

*

NAME dbi_result_get_field_name
	PROTO const char *dbi_result_get_field_name(dbi_result Result, unsigned int idx)
	DESC
	Given a field's numeric index, return that field's name.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The target field's name.

*

NAME dbi_result_get_numfields
	PROTO unsigned int dbi_result_get_numfields(dbi_result Result)
	DESC
	Returns the number of fields in the query result.
	ENDDESC
	ARG Result The target query result.
	RET The number of fields in the query result.

*

NAME dbi_result_get_field_type
	PROTO unsigned short dbi_result_get_field_type(dbi_result Result, const char *fieldname)
	DESC
	Returns the target field's data type. The constants returned by this function are defined in dbi.h with the prefix "DBI_TYPE_".
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The target field's name.
	RET The target field's data type.

*

NAME dbi_result_get_field_type_idx
	PROTO unsigned short dbi_result_get_field_type_idx(dbi_result Result, unsigned int idx)
	DESC
	Returns the target field's data type. The constants returned by this function are defined in dbi.h with the prefix "DBI_TYPE_".
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The target field's data type.

*

NAME dbi_result_get_field_attrib
	PROTO unsigned long dbi_result_get_field_attrib(dbi_result Result, const char *fieldname, unsigned long attribmin, unsigned long attribmax)
	DESC
	Returns the target field's data type attributes in the specified range. The constants returned by this function are defined in dbi.h with the prefix "DBI_", followed by the name of the field's datatype.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The target field's name.
	ARG attribmin The first attribute value in the range of attributes to extract.
	ARG attribmax The last attribute value in the range of attributes to extract. This may be the same as attribmin if you are only trying to extract a single attribute value.
	RET The target field's requested attribute range.

*

NAME dbi_result_get_field_attrib_idx
	PROTO unsigned long dbi_result_get_field_attrib_idx(dbi_result Result, unsigned int idx, unsigned long attribmin, unsigned long attribmax)
	DESC
	Returns the target field's data type attributes in the specified range. The constants returned by this function are defined in dbi.h with the prefix "DBI_", followed by the name of the field's datatype.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	ARG attribmin The first attribute value in the range of attributes to extract.
	ARG attribmax The last attribute value in the range of attributes to extract. This may be the same as attribmin if you are only trying to extract a single attribute value.
	RET The target field's requested attribute range.

*

NAME dbi_result_get_field_attribs
	PROTO unsigned long dbi_result_get_field_attribs(dbi_result Result, const char *fieldname)
	DESC
	Returns the target field's data type attributes. The constants returned by this function are defined in dbi.h with the prefix "DBI_", followed by the name of the field's datatype.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The target field's name.
	RET The target field's attributes.

*

NAME dbi_result_get_field_attribs_idx
	PROTO unsigned long dbi_result_get_field_attribs_idx(dbi_result Result, unsigned int idx)
	DESC
	Returns the target field's data type attributes. The constants returned by this function are defined in dbi.h with the prefix "DBI_", followed by the name of the field's datatype.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The target field's attributes.

*

NAME dbi_result_get_fields
	PROTO int dbi_result_get_fields(dbi_result Result, const char *format, ...)
	DESC-VERBATIM
	<Para>Fetch multiple fields from the current result set, using a printf-like syntax. The formatter string specified field names and types, and each field's associated destination variable is passed as an argument following the format string. Fields in the formatter string are separated by spaces, and follow the format <Literal>"a.%b"</Literal>, where "a" is the name of the field, and "b" is the field type specifier. Make sure you pass the destination variables' memory addresses by prepending the &amp; operator to each variable's name.</Para>
	<Para><Emphasis>Field type specifiers:</Emphasis></Para>
	<ItemizedList>
		<ListItem><Para><Literal>%c / %uc</Literal>: A signed/unsigned character</Para></ListItem>
		<ListItem><Para><Literal>%h / %uh</Literal>: A signed/unsigned short integer</Para></ListItem>
		<ListItem><Para><Literal>%l / %ul</Literal>: A signed/unsigned long integer</Para></ListItem>
		<ListItem><Para><Literal>%i / %ui</Literal>: A signed/unsigned long integer</Para></ListItem>
		<ListItem><Para><Literal>%L / %uL</Literal>: A signed/unsigned long long integer</Para></ListItem>
		<ListItem><Para><Literal>%f</Literal>: A floating point number</Para></ListItem>
		<ListItem><Para><Literal>%d</Literal>: A double-precision number</Para></ListItem>
		<ListItem><Para><Literal>%s</Literal>: A read-only string</Para></ListItem>
		<ListItem><Para><Literal>%S</Literal>: A local copy of a string (must be freed by program)</Para></ListItem>
		<ListItem><Para><Literal>%b</Literal>: A read-only pointer to binary data</Para></ListItem>
		<ListItem><Para><Literal>%B</Literal>: A local copy of binary data (must be freed by program)</Para></ListItem>
		<ListItem><Para><Literal>%m</Literal>: A time_t value representing a DATE and/or TIME</Para></ListItem>
	</ItemizedList>
	<Para><Emphasis>Example usage</Emphasis>: <Literal>dbi_result_get_fields(result, "idnum.%ul lastname.%s", &amp;id_number, &amp;name)</Literal></Para>
	ENDDESC
	ARG Result The target query result.
	ARG format The field format string as described above.
	ARG (...) Pointers to the destination variables corresponding with each field in the format string.
	RET The number of fields fetched, or -1 if there was an error. If an invalid field name was specified it will not cause -1 to be returned, and the other fetched fields will work as usual.

*

NAME dbi_result_bind_fields
	PROTO int dbi_result_bind_fields(dbi_result Result, const char *format, ...)
	DESC-VERBATIM
	<Para>Bind multiple fields in the current result set, using a printf-like syntax. See <XRef linkend="dbi-result-get-fields"> for a detailed explanation of the syntax.</Para>
	ENDDESC
	ARG Result The target query result.
	ARG format The field format string as described above.
	ARG (...) Pointers to the destination variables corresponding with each field in the format string.
	RET The number of field binding set up, or -1 if there was an error.

*

NAME dbi_result_get_char
	PROTO signed char dbi_result_get_char(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains a character.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_uchar
	PROTO unsigned char dbi_result_get_uchar(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains an unsigned character.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_short
	PROTO short dbi_result_get_short(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains a short integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_ushort
	PROTO unsigned short dbi_result_get_ushort(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains an unsigned short integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_long
	PROTO long dbi_result_get_long(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains a long integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_ulong
	PROTO unsigned long dbi_result_get_ulong(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains an unsigned long integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_longlong
	PROTO long long dbi_result_get_longlong(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains a long long integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_ulonglong
	PROTO unsigned long long dbi_result_get_ulonglong(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains an unsigned long long integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_float
	PROTO float dbi_result_get_float(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains a floating-point number.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_double
	PROTO double dbi_result_get_double(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains a double-precision fractional number.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_string
	PROTO const char *dbi_result_get_string(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains a string. The string may not be modified, and may not necessairly persist between row fetches.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_binary
	PROTO const unsigned char *dbi_result_get_binary(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains binary BLOB data. The data may not be modified, and may not necessarily persist between row fetches.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_string_copy
	PROTO char *dbi_result_get_string_copy(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains a string. The newly allocated string may be modified by the host program, but the program is responsible for freeing the string.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_binary_copy
	PROTO unsigned char *dbi_result_get_binary_copy(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the speficied field, which contains binary BLOB data. The newly allocated memory may be modified by the host program, but the program is responsible for freeing the data.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_get_datetime
	PROTO time_t dbi_result_get_datetime(dbi_result Result, const char *fieldname)
	DESC
	Fetch the data stored in the specified field, which contains a DATE and/or TIME value.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to fetch.
	RET The data stored in the specified field.

*

NAME dbi_result_bind_char
	PROTO int dbi_result_bind_char(dbi_result Result, const char *fieldname, char *bindto)
	DESC
	Bind the specified variable to the specified field, which holds a character.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_uchar
	PROTO int dbi_result_bind_uchar(dbi_result Result, const char *fieldname, unsigned char *bindto)
	DESC
	Bind the specified variable to the specified field, which holds an unsigned character.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_short
	PROTO int dbi_result_bind_short(dbi_result Result, const char *fieldname, short *bindto)
	DESC
	Bind the specified variable to the specified field, which holds a short integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_ushort
	PROTO int dbi_result_bind_ushort(dbi_result Result, const char *fieldname, unsigned short *bindto)
	DESC
	Bind the specified variable to the specified field, which holds an unsigned short integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_long
	PROTO int dbi_result_bind_long(dbi_result Result, const char *fieldname, long *bindto)
	DESC
	Bind the specified variable to the specified field, which holds a long integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_ulong
	PROTO int dbi_result_bind_ulong(dbi_result Result, const char *fieldname, unsigned long *bindto)
	DESC
	Bind the specified variable to the specified field, which holds an unsigned long integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_longlong
	PROTO int dbi_result_bind_longlong(dbi_result Result, const char *fieldname, long long *bindto)
	DESC
	Bind the specified variable to the specified field, which holds a long long integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_ulonglong
	PROTO int dbi_result_bind_ulonglong(dbi_result Result, const char *fieldname, unsigned long long *bindto)
	DESC
	Bind the specified variable to the specified field, which holds an unsigned long long integer.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_float
	PROTO int dbi_result_bind_float(dbi_result Result, const char *fieldname, float *bindto)
	DESC
	Bind the specified variable to the specified field, which holds a floating-point number.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_double
	PROTO int dbi_result_bind_double(dbi_result Result, const char *fieldname, double *bindto)
	DESC
	Bind the specified variable to the specified field, which holds a double-precision fractional number.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_string
	PROTO int dbi_result_bind_string(dbi_result Result, const char *fieldname, const char **bindto)
	DESC
	Bind the specified variable to the specified field, which holds a string. The string must not be modified.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_binary
	PROTO int dbi_result_bind_binary(dbi_result Result, const char *fieldname, const unsigned char **bindto)
	DESC
	Bind the specified variable to the specified field, which holds binary BLOB data. The data must not be modified.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_string_copy
	PROTO int dbi_result_bind_string_copy(dbi_result Result, const char *fieldname, char **bindto)
	DESC
	Bind the specified variable to the specified field, which holds a string. The newly allocated string may be modified by the host program, but the program is responsible for freeing the string.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_binary_copy
	PROTO int dbi_result_bind_binary_copy(dbi_result Result, const char *fieldname, unsigned char **bindto)
	DESC
	Bind the specified variable to the specified field, which holds binary BLOB data. The newly allocated data may be modified by the host program, but the program is responsible for freeing the data.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_bind_datetime
	PROTO int dbi_result_bind_datetime(dbi_result Result, const char *fieldname, time_t *bindto)
	DESC
	Bind the specified variable to the specified field, which holds a DATE and/or TIME value.
	ENDDESC
	ARG Result The target query result.
	ARG fieldname The name of the field to bind to.
	ARG bindto A pointer to the variable that will be updated with the specified field's value.
	RET 0 upon success, -1 if there was an error

*

NAME dbi_result_get_char_idx
	PROTO signed char dbi_result_get_char_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains a character.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_uchar_idx
	PROTO unsigned char dbi_result_get_uchar_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains an unsigned character.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_short_idx
	PROTO short dbi_result_get_short_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains a short integer.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_ushort_idx
	PROTO unsigned short dbi_result_get_ushort_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains an unsigned short integer.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_long_idx
	PROTO long dbi_result_get_long_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains a long integer.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_ulong_idx
	PROTO unsigned long dbi_result_get_ulong_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains an unsigned long integer.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_longlong_idx
	PROTO long long dbi_result_get_longlong_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains a long long integer.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_ulonglong_idx
	PROTO unsigned long long dbi_result_get_ulonglong_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains an unsigned long long integer.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_float_idx
	PROTO float dbi_result_get_float_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains a floating-point number.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_double_idx
	PROTO double dbi_result_get_double_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains a double-precision fractional number.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_string_idx
	PROTO const char *dbi_result_get_string_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains a string. The string may not be modified, and may not necessairly persist between row fetches.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_binary_idx
	PROTO const unsigned char *dbi_result_get_binary_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains binary BLOB data. The data may not be modified, and may not necessarily persist between row fetches.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_string_copy_idx
	PROTO char *dbi_result_get_string_copy_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains a string. The newly allocated string may be modified by the host program, but the program is responsible for freeing the string.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_binary_copy_idx
	PROTO unsigned char *dbi_result_get_binary_copy_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the speficied field, which contains binary BLOB data. The newly allocated memory may be modified by the host program, but the program is responsible for freeing the data.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.

*

NAME dbi_result_get_datetime_idx
	PROTO time_t dbi_result_get_datetime_idx(dbi_result Result, unsigned int idx)
	DESC
	Fetch the data stored in the specified field, which contains a DATE and/or TIME value.
	ENDDESC
	ARG Result The target query result.
	ARG idx The index of the target field (starting at 1).
	RET The data stored in the specified field.


