upscaledb
2.2.1
|
Go to the source code of this file.
Functions | |
void | error (const char *foo, ups_status_t st) |
void | usage () |
void | copy_db (ups_db_t *source, ups_db_t *dest) |
int | main (int argc, char **argv) |
Definition at line 42 of file db2.c.
References error(), ups_cursor_close(), ups_cursor_create(), UPS_CURSOR_FIRST, ups_cursor_move(), UPS_CURSOR_NEXT, ups_db_insert(), UPS_DUPLICATE, and UPS_KEY_NOT_FOUND.
Referenced by main().
void error | ( | const char * | foo, |
ups_status_t | st | ||
) |
This example opens an Environment and copies one Database into another. With small modifications this sample would also be able to copy In Memory-Environments to On Disk-Environments and vice versa.
Definition at line 30 of file db2.c.
References ups_strerror().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 87 of file db2.c.
References copy_db(), error(), UPS_AUTO_CLEANUP, UPS_ENABLE_DUPLICATE_KEYS, ups_env_close(), ups_env_create_db(), ups_env_open(), ups_env_open_db(), and usage().