version 1.7, 2003/06/02 19:34:12 |
version 1.8, 2004/01/22 21:48:02 |
|
|
typedef struct __db { |
typedef struct __db { |
DBTYPE type; /* Underlying db type. */ |
DBTYPE type; /* Underlying db type. */ |
int (*close)(struct __db *); |
int (*close)(struct __db *); |
int (*del)(const struct __db *, const DBT *, u_int); |
int (*del)(const struct __db *, const DBT *, unsigned int); |
int (*get)(const struct __db *, const DBT *, DBT *, u_int); |
int (*get)(const struct __db *, const DBT *, DBT *, unsigned int); |
int (*put)(const struct __db *, DBT *, const DBT *, u_int); |
int (*put)(const struct __db *, DBT *, const DBT *, unsigned int); |
int (*seq)(const struct __db *, DBT *, DBT *, u_int); |
int (*seq)(const struct __db *, DBT *, DBT *, unsigned int); |
int (*sync)(const struct __db *, u_int); |
int (*sync)(const struct __db *, unsigned int); |
void *internal; /* Access method private. */ |
void *internal; /* Access method private. */ |
int (*fd)(const struct __db *); |
int (*fd)(const struct __db *); |
} DB; |
} DB; |
|
|
/* Structure used to pass parameters to the btree routines. */ |
/* Structure used to pass parameters to the btree routines. */ |
typedef struct { |
typedef struct { |
#define R_DUP 0x01 /* duplicate keys */ |
#define R_DUP 0x01 /* duplicate keys */ |
u_long flags; |
unsigned long flags; |
u_int cachesize; /* bytes to cache */ |
unsigned int cachesize; /* bytes to cache */ |
int maxkeypage; /* maximum keys per page */ |
int maxkeypage; /* maximum keys per page */ |
int minkeypage; /* minimum keys per page */ |
int minkeypage; /* minimum keys per page */ |
u_int psize; /* page size */ |
unsigned int psize; /* page size */ |
int (*compare) /* comparison function */ |
int (*compare) /* comparison function */ |
(const DBT *, const DBT *); |
(const DBT *, const DBT *); |
size_t (*prefix) /* prefix function */ |
size_t (*prefix) /* prefix function */ |
(const DBT *, const DBT *); |
(const DBT *, const DBT *); |
int lorder; /* byte order */ |
int lorder; /* byte order */ |
} BTREEINFO; |
} BTREEINFO; |
|
|
#define HASHMAGIC 0x061561 |
#define HASHMAGIC 0x061561 |
|
|
|
|
/* Structure used to pass parameters to the hashing routines. */ |
/* Structure used to pass parameters to the hashing routines. */ |
typedef struct { |
typedef struct { |
u_int bsize; /* bucket size */ |
unsigned int bsize; /* bucket size */ |
u_int ffactor; /* fill factor */ |
unsigned int ffactor; /* fill factor */ |
u_int nelem; /* number of elements */ |
unsigned int nelem; /* number of elements */ |
u_int cachesize; /* bytes to cache */ |
unsigned int cachesize; /* bytes to cache */ |
u_int32_t /* hash function */ |
u_int32_t /* hash function */ |
(*hash)(const void *, size_t); |
(*hash)(const void *, size_t); |
int lorder; /* byte order */ |
int lorder; /* byte order */ |
} HASHINFO; |
} HASHINFO; |
|
|
/* Structure used to pass parameters to the record routines. */ |
/* Structure used to pass parameters to the record routines. */ |
typedef struct { |
typedef struct { |
#define R_FIXEDLEN 0x01 /* fixed-length records */ |
#define R_FIXEDLEN 0x01 /* fixed-length records */ |
#define R_NOKEY 0x02 /* key not required */ |
#define R_NOKEY 0x02 /* key not required */ |
#define R_SNAPSHOT 0x04 /* snapshot the input */ |
#define R_SNAPSHOT 0x04 /* snapshot the input */ |
u_long flags; |
unsigned long flags; |
u_int cachesize; /* bytes to cache */ |
unsigned int cachesize; /* bytes to cache */ |
u_int psize; /* page size */ |
unsigned int psize; /* page size */ |
int lorder; /* byte order */ |
int lorder; /* byte order */ |
size_t reclen; /* record length (fixed-length records) */ |
size_t reclen; /* record length |
u_char bval; /* delimiting byte (variable-length records) */ |
(fixed-length records) */ |
char *bfname; /* btree file name */ |
unsigned char bval; /* delimiting byte |
|
(variable-length records) */ |
|
char *bfname; /* btree file name */ |
} RECNOINFO; |
} RECNOINFO; |
|
|
#ifdef __DBINTERFACE_PRIVATE |
#ifdef __DBINTERFACE_PRIVATE |