#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ham/hamsterdb.h>
Go to the source code of this file.
Defines | |
#define | LOOP 1000 |
Functions | |
void | error (const char *foo, ham_status_t st) |
int | main (int argc, char **argv) |
#define LOOP 1000 |
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 creates a database, inserts some values, looks them up and erases them.
void error | ( | const char * | foo, | |
ham_status_t | st | |||
) |
Definition at line 27 of file db1.c.
References ham_strerror().
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 45 of file db1.c.
References ham_record_t::data, ham_key_t::data, error(), ham_close(), ham_create_ex(), ham_delete(), ham_erase(), ham_find(), ham_insert(), HAM_KEY_NOT_FOUND, ham_new(), ham_open_ex(), HAM_SUCCESS, ham_record_t::size, and ham_key_t::size.