Lines Matching defs:db
11 #include <db.h>
243 DB *db;
247 if ((ret = db_create(&db, dbenv, 0)) != 0) {
253 if (dups && (ret = db->set_flags(db, DB_DUP)) != 0) {
254 dbenv->err(dbenv, ret, "db->set_flags: DB_DUP");
264 if ((ret = db->open(db, NULL, name, NULL, DB_BTREE,
266 (void)db->close(db, 0);
267 dbenv->err(dbenv, ret, "db->open: %s", name);
271 *dbp = db;
275 add_fruit(DB_ENV *dbenv, DB *db, char *fruit, char *name)
297 switch (ret = db->put(db, tid, &key, &data, 0)) {
400 add_cat(DB_ENV *dbenv, DB *db, char *name, ...)
422 switch (ret = db->del(db, tid, &key, 0)) {
434 dbenv->err(dbenv, ret, "db->del: %s", name);
439 if ((ret = db->cursor(db, tid, &dbc, 0)) != 0) {
440 dbenv->err(dbenv, ret, "db->cursor");