hamsterdb Embedded Database
2.1.7
|
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 | |
int | run_demo () |
int | main (int argc, char **argv) |
#define DBIDX_C2O 2 |
Definition at line 33 of file env3.cpp.
Referenced by run_demo().
#define DBIDX_CUSTOMER 0 |
Definition at line 31 of file env3.cpp.
Referenced by run_demo().
#define DBIDX_ORDER 1 |
Definition at line 32 of file env3.cpp.
Referenced by run_demo().
#define DBNAME_C2O 3 /* C2O: Customer To Order */ |
Definition at line 29 of file env3.cpp.
Referenced by run_demo().
#define DBNAME_CUSTOMER 1 |
Definition at line 27 of file env3.cpp.
Referenced by run_demo().
#define DBNAME_ORDER 2 |
Definition at line 28 of file env3.cpp.
Referenced by run_demo().
#define MAX_CUSTOMERS 4 |
Definition at line 35 of file env3.cpp.
Referenced by run_demo().
#define MAX_DBS 3 |
This sample does the same as env2, but uses the C++ API.
Definition at line 25 of file env3.cpp.
Referenced by run_demo().
#define MAX_ORDERS 8 |
Definition at line 36 of file env3.cpp.
Referenced by run_demo().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 277 of file env3.cpp.
References hamsterdb::error::get_errno(), hamsterdb::error::get_string(), and run_demo().
int run_demo | ( | ) |
Definition at line 54 of file env3.cpp.
References hamsterdb::env::create(), hamsterdb::env::create_db(), DBIDX_C2O, DBIDX_CUSTOMER, DBIDX_ORDER, DBNAME_C2O, DBNAME_CUSTOMER, DBNAME_ORDER, hamsterdb::db::find(), hamsterdb::cursor::find(), hamsterdb::record::get_data(), hamsterdb::error::get_errno(), hamsterdb::error::get_string(), HAM_CURSOR_NEXT, HAM_DUPLICATE, HAM_ENABLE_DUPLICATE_KEYS, HAM_KEY_NOT_FOUND, HAM_ONLY_DUPLICATES, HAM_PARAM_KEY_TYPE, HAM_PARAM_RECORD_SIZE, HAM_TYPE_UINT32, customer_t::id, hamsterdb::db::insert(), MAX_CUSTOMERS, MAX_DBS, MAX_ORDERS, hamsterdb::cursor::move(), hamsterdb::cursor::move_next(), customer_t::name, hamsterdb::key::set_data(), hamsterdb::record::set_data(), hamsterdb::key::set_size(), and hamsterdb::record::set_size().