#include <stdio.h>
#include <string.h>
#include <ups/upscaledb.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 29 of file db5.c.
Referenced by main().
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 32 of file db5.c.
References ups_record_t::data, ups_key_t::data, DATABASE_NAME, ups_record_t::size, ups_key_t::size, UPS_AUTO_CLEANUP, ups_cursor_create(), ups_cursor_move(), UPS_CURSOR_NEXT, ups_db_insert(), UPS_DUPLICATE, UPS_ENABLE_DUPLICATE_KEYS, ups_env_close(), ups_env_create(), ups_env_create_db(), UPS_IN_MEMORY, UPS_KEY_NOT_FOUND, UPS_PARAM_RECORD_SIZE, and UPS_SUCCESS.