Handbook
Glossary
db-close ( handle -- )
Furnace framework
»
Database library
»
Low-level database protocol
Prev:
db-open ( db -- db-connection )
Next:
<simple-statement> ( string in out -- statement )
Vocabulary
db
Inputs
handle
an
alien
Outputs
None
Word description
Closes a database using the handle provided. Use of the
with-db
combinator is preferred over manually opening and closing databases so that resources are not leaked.
See also
db-open
,
with-db
Definition
IN:
db
HOOK:
db-close
db-connection
( handle -- )
Methods
USING:
db
db.mysql
db.mysql.ffi
;
M:
mysql-db-connection
db-close
mysql_close
;
USING:
db
db.postgresql.ffi
db.postgresql.private
;
M:
postgresql-db-connection
db-close
PQfinish
;
USING:
db
db.sqlite.lib
db.sqlite.private
;
M:
sqlite-db-connection
db-close
sqlite-close
;