2
* See the file LICENSE for redistribution information.
4
* Copyright (c) 1997-2002
5
* Sleepycat Software. All rights reserved.
8
* Copyright (c) 1990, 1993, 1994, 1995, 1996
9
* Keith Bostic. All rights reserved.
12
* Copyright (c) 1990, 1993, 1994
13
* The Regents of the University of California. All rights reserved.
15
* Redistribution and use in source and binary forms, with or without
16
* modification, are permitted provided that the following conditions
18
* 1. Redistributions of source code must retain the above copyright
19
* notice, this list of conditions and the following disclaimer.
20
* 2. Redistributions in binary form must reproduce the above copyright
21
* notice, this list of conditions and the following disclaimer in the
22
* documentation and/or other materials provided with the distribution.
23
* 3. Neither the name of the University nor the names of its contributors
24
* may be used to endorse or promote products derived from this software
25
* without specific prior written permission.
27
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39
* $Id: db185_int.in,v 11.12 2002/01/11 15:51:51 bostic Exp $
46
#define R_CURSOR 1 /* del, put, seq */
47
#define __R_UNUSED 2 /* UNUSED */
48
#define R_FIRST 3 /* seq */
49
#define R_IAFTER 4 /* put (RECNO) */
50
#define R_IBEFORE 5 /* put (RECNO) */
51
#define R_LAST 6 /* seq (BTREE, RECNO) */
52
#define R_NEXT 7 /* seq */
53
#define R_NOOVERWRITE 8 /* put */
54
#define R_PREV 9 /* seq (BTREE, RECNO) */
55
#define R_SETCURSOR 10 /* put (RECNO) */
56
#define R_RECNOSYNC 11 /* sync (RECNO) */
59
void *data; /* data */
60
size_t size; /* data length */
63
/* Access method description structure. */
64
typedef struct __db185 {
65
DBTYPE type; /* Underlying db type. */
66
int (*close) __P((struct __db185 *));
67
int (*del) __P((const struct __db185 *, const DBT185 *, u_int));
69
__P((const struct __db185 *, const DBT185 *, DBT185 *, u_int));
71
__P((const struct __db185 *, DBT185 *, const DBT185 *, u_int));
73
__P((const struct __db185 *, DBT185 *, DBT185 *, u_int));
74
int (*sync) __P((const struct __db185 *, u_int));
75
DB *dbp; /* DB structure. Was void *internal. */
76
int (*fd) __P((const struct __db185 *));
80
* The following elements added to the end of the DB 1.85 DB
83
DBC *dbc; /* DB cursor. */
84
/* Various callback functions. */
85
int (*compare) __P((const DBT *, const DBT *));
86
size_t (*prefix) __P((const DBT *, const DBT *));
87
u_int32_t (*hash) __P((const void *, size_t));
90
/* Structure used to pass parameters to the btree routines. */
92
#define R_DUP 0x01 /* duplicate keys */
94
u_int32_t cachesize; /* bytes to cache */
95
u_int32_t maxkeypage; /* maximum keys per page */
96
u_int32_t minkeypage; /* minimum keys per page */
97
u_int32_t psize; /* page size */
98
int (*compare) /* comparison function */
99
__P((const DBT *, const DBT *));
100
size_t (*prefix) /* prefix function */
101
__P((const DBT *, const DBT *));
102
int lorder; /* byte order */
105
/* Structure used to pass parameters to the hashing routines. */
107
u_int32_t bsize; /* bucket size */
108
u_int32_t ffactor; /* fill factor */
109
u_int32_t nelem; /* number of elements */
110
u_int32_t cachesize; /* bytes to cache */
111
u_int32_t /* hash function */
112
(*hash) __P((const void *, size_t));
113
int lorder; /* byte order */
116
/* Structure used to pass parameters to the record routines. */
118
#define R_FIXEDLEN 0x01 /* fixed-length records */
119
#define R_NOKEY 0x02 /* key not required */
120
#define R_SNAPSHOT 0x04 /* snapshot the input */
122
u_int32_t cachesize; /* bytes to cache */
123
u_int32_t psize; /* page size */
124
int lorder; /* byte order */
125
size_t reclen; /* record length (fixed-length records) */
126
u_char bval; /* delimiting byte (variable-length records */
127
char *bfname; /* btree file name */
129
#endif /* !_DB185_INT_H_ */