hamsterdb Embedded Database 1.1.13
|
#include <iostream>
#include <ham/hamsterdb.hpp>
Go to the source code of this file.
Defines | |
#define | LOOP 10 |
Functions | |
int | run_demo (void) |
int | main (int argc, char **argv) |
#define LOOP 10 |
Copyright (C) 2005-2007 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.
A simple example, which creates a database, inserts some values, looks them up and erases them. Uses the C++ api.
Definition at line 19 of file db6.cpp.
Referenced by run_demo().
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 119 of file db6.cpp.
References ham::error::get_errno(), ham::error::get_string(), and run_demo().
int run_demo | ( | void | ) |
Definition at line 22 of file db6.cpp.
References ham::db::close(), ham::db::create(), ham::db::erase(), ham::db::find(), ham::record::get_data(), ham::error::get_errno(), ham::error::get_string(), HAM_KEY_NOT_FOUND, ham::db::insert(), LOOP, ham::db::open(), ham::record::set_data(), ham::key::set_data(), ham::record::set_size(), and ham::key::set_size().
Referenced by main().