#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 demonstrates the use of duplicate items. Every line is split into words, and each word is inserted with its line number. Then a cursor is used to print all words in a sorted order, with the lines in which the word occurred.
Definition at line 28 of file db5.c.
Referenced by main().
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 31 of file db5.c.
References ham_record_t::data, ham_key_t::data, DATABASE_NAME, HAM_AUTO_CLEANUP, ham_cursor_create(), ham_cursor_move(), HAM_CURSOR_NEXT, ham_db_insert(), HAM_DUPLICATE, HAM_ENABLE_DUPLICATE_KEYS, ham_env_close(), ham_env_create(), ham_env_create_db(), HAM_IN_MEMORY, HAM_KEY_NOT_FOUND, HAM_PARAM_RECORD_SIZE, HAM_SUCCESS, ham_record_t::size, and ham_key_t::size.