Handbook
Glossary
with-db ( db quot -- )
Vocabulary
db
Inputs
db
a database configuration object
quot
a
quotation
Outputs
None
Word description
Calls the quotation with a database bound to the
db-connection
symbol. See
Custom database combinators
for help setting up database access.
Notes
Direct continuation jumps out of the quotation bypass connection disposal. Keep validation or other nonlocal exits outside this scope. See
Resource disposal and continuations
.
See also
db-open
,
db-close
Definition
USING:
destructors
kernel
namespaces
;
IN:
db
:
with-db
( db quot -- )
[
db-open
db-connection
]
dip
'[
db-connection
get
[
drop
@
]
with-disposal
]
with-variable
;
inline