1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors kernel arrays namespaces sequences continuations
4 io.pools db fry db.private ;
7 TUPLE: db-pool < pool db ;
9 : <db-pool> ( db -- pool )
13 : with-db-pool ( db quot -- )
14 [ <db-pool> ] dip with-pool ; inline
16 M: db-pool make-connection ( pool -- )
19 : with-pooled-db ( pool quot -- )
20 '[ db-connection _ with-variable ] with-pooled-connection ; inline