hamsterdb Embedded Database 1.1.13
|
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ham/hamsterdb.h>
Go to the source code of this file.
Defines | |
#define | LOOP 10 |
Functions | |
void | error (const char *foo, ham_status_t st) |
int | main (int argc, char **argv) |
#define LOOP 10 |
Copyright (C) 2005-2008 Christoph Rupp (chris@crupp.de).
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
See files COPYING.* for License information.
A simple example which connects to a hamsterdb server (see server1.c), creates a database, inserts some values, looks them up and erases them.
Definition at line 21 of file client1.c.
Referenced by main().
void error | ( | const char * | foo, |
ham_status_t | st | ||
) |
Definition at line 24 of file client1.c.
References ham_strerror().
Referenced by ham::txn::abort(), ham::db::begin(), ham::cursor::clone(), ham::env::close(), ham::cursor::close(), ham::db::close(), ham::txn::commit(), copy_db(), ham::env::create(), ham::cursor::create(), ham::db::create(), ham::env::create_db(), ham::db::enable_compression(), ham::env::enable_encryption(), ham::cursor::erase(), ham::db::erase(), ham::env::erase_db(), ham::cursor::find(), ham::db::find(), ham::cursor::find_ex(), ham::db::flush(), ham::env::get_database_names(), ham::cursor::get_duplicate_count(), ham::db::get_key_count(), ham::env::get_parameters(), ham::db::get_parameters(), ham::cursor::insert(), ham::db::insert(), ham::key::key(), main(), ham::cursor::move(), ham::env::open(), ham::db::open(), ham::env::open_db(), ham::cursor::overwrite(), ham::env::rename_db(), ham::db::set_compare_func(), ham::db::set_prefix_compare_func(), and ham::key::set_size().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 31 of file client1.c.
References ham_record_t::data, ham_key_t::data, error(), ham_close(), ham_delete(), ham_env_create_ex(), ham_env_new(), ham_env_open_db(), ham_erase(), ham_find(), ham_insert(), HAM_KEY_NOT_FOUND, ham_new(), HAM_SUCCESS, LOOP, ham_record_t::size, and ham_key_t::size.