Handbook
Glossary
with-db ( mdb quot -- )
Vocabulary
mongodb
.
driver
Inputs
mdb
mdb instance
quot
quotation to execute with the given mdb instance as context
Outputs
None
Word description
executes a quotation with the given mdb instance in its context
Definition
USING:
destructors
kernel
mongodb.connection
;
IN:
mongodb.driver
:
with-db
( mdb quot -- )
[
[
mdb-open
&dispose
]
curry
]
dip
[
with-connection
]
curry
compose
with-destructors
;
inline