hamsterdb Embedded Database 1.1.15
Data Structures | Defines | Functions
env1.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ham/hamsterdb.h>

Go to the source code of this file.

Data Structures

struct  customer_t
struct  order_t

Defines

#define MAX_DBS   2
#define DBNAME_CUSTOMER   1
#define DBNAME_ORDER   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 Documentation

#define DBNAME_CUSTOMER   1

Definition at line 44 of file env1.c.

Referenced by main().

#define DBNAME_ORDER   2

Definition at line 45 of file env1.c.

Referenced by main().

#define MAX_CUSTOMERS   4

Definition at line 47 of file env1.c.

Referenced by main().

#define MAX_DBS   2

Definition at line 42 of file env1.c.

Referenced by main().

#define MAX_ORDERS   8

Definition at line 48 of file env1.c.

Referenced by main().


Function Documentation

void error ( const char *  foo,
ham_status_t  st 
)

Copyright (C) 2005-2008 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 environment with several databases.

Definition at line 25 of file env1.c.

References ham_strerror().

int main ( int  argc,
char **  argv 
)