Next: , Previous: , Up: lib-bdb   [Contents][Index]


10.6.6 An Example Session

| ?- db_open(tempdb, update, [a(+,-)], DBRef), assert(tempdb(DBRef)).
DBRef = '$db'(1077241400)

| ?- tempdb(DBRef), db_store(DBRef, a(b,1), _).
DBRef = '$db'(1077241400)

| ?- tempdb(DBRef), db_store(DBRef, a(c,2), _).
DBRef = '$db'(1077241400)

| ?- tempdb(DBRef), db_fetch(DBRef, a(b,X), _).
X = 1,
DBRef = '$db'(1077241400) ? ;
no

| ?- tempdb(DBRef), db_enumerate(DBRef, X, _).
X = a(b,1),
DBRef = '$db'(1077241400) ? ;
X = a(c,2),
DBRef = '$db'(1077241400) ? ;
no

| ?- db_current(DBName, Mode, Spec, EnvRef, DBRef).
Mode = update,
Spec = [a(+,-)],
DBRef = '$db'(1077241400),
DBName = tempdb,
EnvRef = none ? ;
no

| ?- tempdb(DBRef), db_close(DBRef).
DBRef = '$db'(1077241400)

Send feedback on this subject.