#include <stdio.h>
#include <string.h>
#include <ham/hamsterdb.h>
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
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.
This sample uses hamsterdb to read data from stdin into a "record number" database; every word is inserted into the database in the order of its processing. Then a cursor is used to print all words in the original order.
Definition at line 23 of file db4.c.
References ham_record_t::data, ham_key_t::data, ham_key_t::flags, HAM_AUTO_CLEANUP, ham_close(), ham_create(), ham_cursor_create(), ham_cursor_move(), HAM_CURSOR_NEXT, ham_delete(), HAM_DUPLICATE_KEY, ham_insert(), HAM_KEY_NOT_FOUND, HAM_KEY_USER_ALLOC, ham_new(), HAM_RECORD_NUMBER, HAM_SUCCESS, ham_record_t::size, and ham_key_t::size.