Lines Matching full:db

37 #include <db.h>
49 void (*func)(DB *, char **);
54 DB *globaldb;
56 void append(DB *, char **);
57 void bstat(DB *, char **);
58 void cursor(DB *, char **);
59 void delcur(DB *, char **);
60 void delete(DB *, char **);
61 void dump(DB *, char **);
62 void first(DB *, char **);
63 void get(DB *, char **);
64 void help(DB *, char **);
65 void iafter(DB *, char **);
66 void ibefore(DB *, char **);
67 void icursor(DB *, char **);
68 void insert(DB *, char **);
70 void last(DB *, char **);
71 void list(DB *, char **);
72 void load(DB *, char **);
73 void mstat(DB *, char **);
74 void next(DB *, char **);
76 void previous(DB *, char **);
77 void show(DB *, char **);
79 void user(DB *);
118 DB *db; local
166 db = dbopen(*argv == NULL ? NULL : *argv, O_RDWR,
169 db = dbopen(*argv == NULL ? NULL : *argv, O_CREAT|O_RDWR,
172 if (db == NULL) {
176 globaldb = db;
177 user(db);
183 user(db) in user() argument
184 DB *db; in user()
235 (*commands[i].func)(db, argv);
237 if ((db->sync)(db) == RET_ERROR)
239 else if ((db->close)(db) == RET_ERROR)
267 append(db, argv) in append() argument
268 DB *db; in append()
276 "append only available for recno db's.\n");
283 status = (db->put)(db, &key, &data, R_APPEND);
297 cursor(db, argv) in cursor() argument
298 DB *db; in cursor()
309 status = (*db->seq)(db, &key, &data, R_CURSOR);
324 delcur(db, argv) in delcur() argument
325 DB *db; in delcur()
330 status = (*db->del)(db, NULL, R_CURSOR);
337 delete(db, argv) in delete() argument
338 DB *db; in delete()
350 status = (*db->del)(db, &key, 0);
364 dump(db, argv) in dump() argument
365 DB *db; in dump()
368 __bt_dump(db);
372 first(db, argv) in first() argument
373 DB *db; in first()
379 status = (*db->seq)(db, &key, &data, R_FIRST);
395 get(db, argv) in get() argument
396 DB *db; in get()
408 status = (*db->get)(db, &key, &data, 0);
424 help(db, argv) in help() argument
425 DB *db; in help()
437 iafter(db, argv) in iafter() argument
438 DB *db; in iafter()
446 "iafter only available for recno db's.\n");
453 status = (db->put)(db, &key, &data, R_IAFTER);
467 ibefore(db, argv) in ibefore() argument
468 DB *db; in ibefore()
476 "ibefore only available for recno db's.\n");
483 status = (db->put)(db, &key, &data, R_IBEFORE);
497 icursor(db, argv) in icursor() argument
498 DB *db; in icursor()
512 status = (*db->put)(db, &key, &data, R_CURSOR);
526 insert(db, argv) in insert() argument
527 DB *db; in insert()
541 status = (*db->put)(db, &key, &data, R_NOOVERWRITE);
555 last(db, argv) in last() argument
556 DB *db; in last()
562 status = (*db->seq)(db, &key, &data, R_LAST);
578 list(db, argv) in list() argument
579 DB *db; in list()
590 status = (*db->seq)(db, &key, &data, R_FIRST);
593 status = (*db->seq)(db, &key, &data, R_NEXT);
599 DB *BUGdb;
601 load(db, argv) in load() argument
602 DB *db; in load()
613 BUGdb = db;
635 status = (*db->put)(db, &key, &data, R_NOOVERWRITE);
656 next(db, argv) in next() argument
657 DB *db; in next()
663 status = (*db->seq)(db, &key, &data, R_NEXT);
679 previous(db, argv) in previous() argument
680 DB *db; in previous()
686 status = (*db->seq)(db, &key, &data, R_PREV);
702 show(db, argv) in show() argument
703 DB *db; in show()
711 t = db->internal;
724 bstat(db, argv) in bstat() argument
725 DB *db; in bstat()
729 __bt_stat(db);
733 mstat(db, argv) in mstat() argument
734 DB *db; in mstat()
738 mpool_stat(((BTREE *)db->internal)->bt_mp);