#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 uses upscaledb 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 29 of file db4.c.
Referenced by main().
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 32 of file db4.c.
References ups_record_t::data, ups_key_t::data, DATABASE_NAME, ups_key_t::flags, 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_KEY, ups_env_close(), ups_env_create(), ups_env_create_db(), UPS_KEY_NOT_FOUND, UPS_KEY_USER_ALLOC, UPS_RECORD_NUMBER32, and UPS_SUCCESS.