|
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 | |
| int | run_demo () |
| int | main (int argc, char **argv) |
| #define DBIDX_C2O 2 |
Definition at line 27 of file env3.cpp.
Referenced by run_demo().
| #define DBIDX_CUSTOMER 0 |
Definition at line 25 of file env3.cpp.
Referenced by run_demo().
| #define DBIDX_ORDER 1 |
Definition at line 26 of file env3.cpp.
Referenced by run_demo().
| #define DBNAME_C2O 3 /* C2O: Customer To Order */ |
Definition at line 23 of file env3.cpp.
Referenced by run_demo().
| #define DBNAME_CUSTOMER 1 |
Definition at line 21 of file env3.cpp.
Referenced by run_demo().
| #define DBNAME_ORDER 2 |
Definition at line 22 of file env3.cpp.
Referenced by run_demo().
| #define MAX_CUSTOMERS 4 |
Definition at line 29 of file env3.cpp.
Referenced by run_demo().
| #define MAX_DBS 3 |
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.
This sample does the same as env2, but uses the C++ API.
Definition at line 19 of file env3.cpp.
Referenced by run_demo().
| #define MAX_ORDERS 8 |
Definition at line 30 of file env3.cpp.
Referenced by run_demo().
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 255 of file env3.cpp.
References hamsterdb::error::get_errno(), hamsterdb::error::get_string(), and run_demo().
| int run_demo | ( | ) |
Definition at line 50 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_DUPLICATES, HAM_KEY_NOT_FOUND, HAM_ONLY_DUPLICATES, 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().
1.7.6.1