#include <stdio.h>
#include <string.h>
#include <ups/upscaledb.h>
Go to the source code of this file.
This sample uses upscaledb to sort data from stdin. Every word is inserted into the database (duplicate words are ignored). Then a cursor is used to print all words in sorted order.
Definition at line 27 of file db3.c.
Referenced by main().
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 42 of file db3.c.
References ups_key_t::data, DATABASE_NAME, my_string_compare(), ups_key_t::size, UPS_AUTO_CLEANUP, ups_cursor_create(), ups_cursor_move(), UPS_CURSOR_NEXT, ups_db_insert(), ups_db_set_compare_func(), UPS_DUPLICATE_KEY, UPS_ENABLE_DUPLICATE_KEYS, ups_env_close(), ups_env_create(), ups_env_create_db(), UPS_KEY_NOT_FOUND, UPS_PARAM_KEY_TYPE, UPS_PARAM_RECORD_SIZE, UPS_SUCCESS, and UPS_TYPE_CUSTOM.