#include <stdio.h>
#include <string.h>
#include <ham/hamsterdb.h>
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
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 28 of file db4.c.
Referenced by main().
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 31 of file db4.c.
References ham_record_t::data, ham_key_t::data, DATABASE_NAME, ham_key_t::flags, HAM_AUTO_CLEANUP, ham_cursor_create(), ham_cursor_move(), HAM_CURSOR_NEXT, ham_db_insert(), HAM_DUPLICATE_KEY, ham_env_close(), ham_env_create(), ham_env_create_db(), HAM_KEY_NOT_FOUND, HAM_KEY_USER_ALLOC, HAM_RECORD_NUMBER, HAM_SUCCESS, ham_record_t::size, and ham_key_t::size.