upscaledb
2.2.1
|
Go to the source code of this file.
Data Structures | |
struct | customer_t |
struct | order_t |
Macros | |
#define | MAX_DBS 3 |
#define | DBNAME_CUSTOMER 1 |
#define | DBNAME_ORDER 2 |
#define | DBNAME_C2O 3 /* C2O: Customer To Order */ |
#define | DBIDX_CUSTOMER 0 |
#define | DBIDX_ORDER 1 |
#define | DBIDX_C2O 2 |
#define | MAX_CUSTOMERS 4 |
#define | MAX_ORDERS 8 |
Functions | |
void | error (const char *foo, ups_status_t st) |
int | main (int argc, char **argv) |
#define DBNAME_C2O 3 /* C2O: Customer To Order */ |
void error | ( | const char * | foo, |
ups_status_t | st | ||
) |
Similar to env1, an Environment with a customer- and an order-Database is created; a third Database is created which manages the 1:n relationship between the other two.
Definition at line 30 of file env2.c.
References ups_strerror().
Referenced by main().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 64 of file env2.c.
References order_t::assignee, order_t::customer_id, ups_record_t::data, ups_key_t::data, DBIDX_C2O, DBIDX_CUSTOMER, DBIDX_ORDER, DBNAME_C2O, DBNAME_CUSTOMER, DBNAME_ORDER, error(), customer_t::id, order_t::id, MAX_CUSTOMERS, MAX_DBS, MAX_ORDERS, customer_t::name, ups_record_t::size, ups_key_t::size, UPS_AUTO_CLEANUP, ups_cursor_create(), ups_cursor_find(), ups_cursor_move(), UPS_CURSOR_NEXT, ups_db_find(), ups_db_insert(), UPS_DUPLICATE, UPS_ENABLE_DUPLICATE_KEYS, ups_env_close(), ups_env_create(), ups_env_create_db(), UPS_KEY_NOT_FOUND, UPS_ONLY_DUPLICATES, UPS_PARAM_KEY_TYPE, UPS_PARAM_RECORD_SIZE, UPS_SUCCESS, and UPS_TYPE_UINT32.