C API documentation

The API documentation is automagically generated with Doxygen from the central header file upscaledb.h. It lists all functions, macros, constants, status codes and structures. It is the most authoritative documentation available and is available online.

If you want to create or open Databases or Environments (a collection of multiple Databases), the following functions will be interesting for you:

ups_env_createCreates an Environment
ups_env_openOpens an Environment
ups_env_closeCloses an Environment
ups_env_create_dbCreates a Database in an Environment
ups_env_open_dbOpens a Database from an Environment
ups_db_closeCloses a Database

To insert, lookup or delete key/value pairs, the following functions are used:

ups_db_insertInserts a key/value pair into a Database
ups_db_findLookup of a key/value pair in a Database
ups_db_eraseErases a key/value pair from a Database

Alternatively, you can use Cursors to iterate over a Database:

ups_cursor_createCreates a new Cursor
ups_cursor_findPositions the Cursor on a key
ups_cursor_insertInserts a new key/value pair with a Cursor
ups_cursor_eraseDeletes the key/value pair that the Cursor points to
ups_cursor_overwriteOverwrites the value of the current key
ups_cursor_moveMoves the Cursor to the first, next, previous or last key in the Database
ups_cursor_closeCloses the Cursor

If you want to use Transactions, then the following functions are required:

ups_txn_beginBegins a new Transaction
ups_txn_commitCommits the current Transaction
ups_txn_abortAborts the current Transaction

upscaledb supports remote Databases. The server can be embedded into your application or run standalone (see tools/upszilla for a Unix daemon or Win32 service which hosts Databases). If you want to embed the server then the following functions have to be used:

ups_srv_initInitializes the server
ups_srv_add_envAdds an Environment to the server. The Environment with all its Databases will then be available remotely.
ups_srv_closeCloses the server and frees all allocated resources

If you need help then you're always welcome to use the mailing list, drop a message (info@upscaledb.com) or use the contact form.

Have fun!