|
hamsterdb Embedded Database
2.1.1
|
Go to the source code of this file.
Data Structures | |
| struct | customer_t |
| struct | order_t |
Defines | |
| #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, ham_status_t st) |
| int | main (int argc, char **argv) |
| #define DBIDX_CUSTOMER 0 |
| #define DBIDX_ORDER 1 |
| #define DBNAME_C2O 3 /* C2O: Customer To Order */ |
| #define DBNAME_CUSTOMER 1 |
| #define DBNAME_ORDER 2 |
| #define MAX_CUSTOMERS 4 |
| #define MAX_ORDERS 8 |
| void error | ( | const char * | foo, |
| ham_status_t | st | ||
| ) |
Copyright (C) 2005-2013 Christoph Rupp (chris@crupp.de).
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
See files COPYING.* for License information.
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 23 of file env2.c.
References ham_strerror().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 59 of file env2.c.
References order_t::assignee, order_t::customer_id, ham_record_t::data, ham_key_t::data, DBIDX_C2O, DBIDX_CUSTOMER, DBIDX_ORDER, DBNAME_C2O, DBNAME_CUSTOMER, DBNAME_ORDER, error(), HAM_AUTO_CLEANUP, ham_cursor_create(), ham_cursor_find(), ham_cursor_move(), HAM_CURSOR_NEXT, ham_db_find(), ham_db_insert(), HAM_DUPLICATE, HAM_ENABLE_DUPLICATES, ham_env_close(), ham_env_create(), ham_env_create_db(), HAM_KEY_NOT_FOUND, HAM_ONLY_DUPLICATES, HAM_SUCCESS, customer_t::id, order_t::id, MAX_CUSTOMERS, MAX_DBS, MAX_ORDERS, customer_t::name, ham_record_t::size, and ham_key_t::size.
1.7.6.1