Database Independent Abstraction Layer for C: libdbi Programmer's Guide | ||
---|---|---|
Prev | Chapter 3. libdbi API Reference | Next |
dbi_plugin dbi_plugin_list(dbi_plugin Current) |
Enumerates all loaded plugins. If Current is NULL, the first available plugin will be returned. If Current is a valid plugin, the next available plugin will be returned.
Current: The current plugin in the list of plugins.
The next available plugin, or NULL if there is an error or no more are available.
dbi_plugin dbi_plugin_open(const char *name) |
Locate the plugin with the specified name.
name: The name of the plugin to open.
The requested plugin, or NULL if there is an error or it is not found.
int dbi_plugin_is_reserved_word(dbi_plugin Plugin, const char *word) |
Looks for the specified word in the list of reserved words. The result of this function may vary between databases. Case does not matter.
Plugin: The target plugin.
word: The word to check against the reserved word list.
-1 if an error occurs, 0 if the word is not reserved, 1 otherwise.
void *dbi_plugin_specific_function(dbi_plugin Plugin, const char *name) |
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.
Plugin: The target plugin.
name: The name of the custom function.
If the custom function is found, a pointer to that function. If not, returns NULL.
int dbi_plugin_quote_string(dbi_plugin Plugin, char **orig) |
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).
Plugin: The target plugin.
orig: A pointer to the string to quote and escape.
The new string's length.
const char *dbi_plugin_get_name(dbi_plugin Plugin) |
Requests the name of the specified plugin. The calling program must not attempt to free the returned string.
Plugin: The target plugin.
A string containing the plugin's name.
const char *dbi_plugin_get_filename(dbi_plugin Plugin) |
Requests the filename of the specified plugin. The calling program must not attempt to free the returned string.
Plugin: The target plugin.
A string containing the plugin's full path and file name.
const char *dbi_plugin_get_description(dbi_plugin Plugin) |
Requests a description of the specified plugin. The calling program must not attempt to free the returned string.
Plugin: The target plugin.
A string containing the plugin's description. It will be one or two short sentences with no newlines.
const char *dbi_plugin_get_maintainer(dbi_plugin Plugin) |
Requests the maintainer of the specified plugin. The calling program must not attempt to free the returned string.
Plugin: The target plugin.
A string containing the plugin maintainer's full name and email address.
const char *dbi_plugin_get_url(dbi_plugin Plugin) |
Requests the maintainer's URL for the specified plugin. This is useful for plugins maintained by a third party. The calling program must not attempt to free the returned string.
Plugin: The target plugin.
const char *dbi_plugin_get_version(dbi_plugin Plugin) |
Requests the version of the specified plugin. The calling program must not attempt to free the returned string.
Plugin: The target plugin.
A string containing the plugin's version.
const char *dbi_plugin_get_date_compiled(dbi_plugin Plugin) |
Requests the compilation date of the specified plugin. The calling program must not attempt to free the returned string.
Plugin: The target plugin.
A string containing the date the plugin was compiled.