Lines Matching full:db
38 #include <db.h>
40 #include <db5/db.h>
42 #include <db4/db.h>
44 #include <db3/db.h>
46 #include <db.h>
65 #define D(X) ((DB*)(X))
68 dbm_close (DBM *db) in dbm_close() argument
71 D(db)->close(D(db), 0); in dbm_close()
74 D(db)->close(D(db)); in dbm_close()
79 dbm_delete (DBM *db, datum dkey) in dbm_delete() argument
84 RETURN(D(db)->del(D(db), NULL, &key, 0)); in dbm_delete()
86 RETURN(D(db)->del(D(db), &key, 0)); in dbm_delete()
91 dbm_fetch (DBM *db, datum dkey) in dbm_fetch() argument
96 if(D(db)->get(D(db), in dbm_fetch()
111 dbm_get (DB *db, int flags) in dbm_get() argument
117 db->cursor(db, NULL, &cursor, 0); in dbm_get()
124 db->seq(db, &key, &value, flags); in dbm_get()
138 dbm_firstkey (DBM *db) in dbm_firstkey() argument
140 return dbm_get(D(db), DB_FIRST); in dbm_firstkey()
144 dbm_nextkey (DBM *db) in dbm_nextkey() argument
146 return dbm_get(D(db), DB_NEXT); in dbm_nextkey()
155 DB *db; local
160 strcat(fn, ".db");
173 if(db_create(&db, NULL, 0) != 0) {
179 if(db->open(db, NULL, fn, NULL, DB_BTREE, myflags, mode) != 0) {
181 if(db->open(db, fn, NULL, DB_BTREE, myflags, mode) != 0) {
184 db->close(db, 0);
188 db = dbopen(fn, flags, mode, DB_BTREE, NULL);
191 return (DBM*)db;
195 dbm_store (DBM *db, datum dkey, datum dvalue, int flags) argument
204 ret = D(db)->put(D(db),
215 dbm_error (DBM *db) argument
221 dbm_clearerr (DBM *db) argument