Core Library Functions

Database Independent Abstraction Layer for C: libdbi Programmer's Guide
Prev | Chapter 3. libdbi API Reference | Next

# 3.1. Core Library Functions

## 3.1.1. dbi_initialize

    int dbi_initialize(const char *plugindir)

Locates all available shared modules (plugins) and loads them into memory.

Arguments

  `plugindir`: The directory to search for plugins. If NULL, DBI_PLUGIN_DIR (defined at compile time) will be used instead.

Returns

  The number of plugins successfully loaded, or -1 if there was an error.

## 3.1.2. dbi_shutdown

    void dbi_shutdown()

Frees all loaded plugins and terminates the DBI system. You should close each driver you opened before shutting down, but libdbi will clean up after you if you don't.

## 3.1.3. dbi_version

    const char *dbi_version()

Requests the version of libdbi. The calling program must not attempt to free the returned string.

Returns

  A string containing the library's name and version.

Prev | Home | Next
libdbi API Reference | Up | Plugin Infrastructure