upscaledb  2.2.1
Data Structures | Macros | Functions
env2.c File Reference
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ups/upscaledb.h>

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

void error (const char *foo, ups_status_t st)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

#define DBIDX_C2O   2

Definition at line 43 of file env2.c.

Referenced by main().

#define DBIDX_CUSTOMER   0

Definition at line 41 of file env2.c.

Referenced by main().

#define DBIDX_ORDER   1

Definition at line 42 of file env2.c.

Referenced by main().

#define DBNAME_C2O   3 /* C2O: Customer To Order */

Definition at line 39 of file env2.c.

Referenced by main().

#define DBNAME_CUSTOMER   1

Definition at line 37 of file env2.c.

Referenced by main().

#define DBNAME_ORDER   2

Definition at line 38 of file env2.c.

Referenced by main().

#define MAX_CUSTOMERS   4

Definition at line 45 of file env2.c.

Referenced by main().

#define MAX_DBS   3

Definition at line 35 of file env2.c.

Referenced by main().

#define MAX_ORDERS   8

Definition at line 46 of file env2.c.

Referenced by main().

Function Documentation

void error ( const char *  foo,
ups_status_t  st 
)

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 30 of file env2.c.

References ups_strerror().

Referenced by main().

int main ( int  argc,
char **  argv 
)