1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors db io.pools kernel namespaces ;
6 TUPLE: db-pool < pool db ;
8 : <db-pool> ( db -- pool )
12 : with-db-pool ( db quot -- )
13 [ <db-pool> ] dip with-pool ; inline
15 M: db-pool make-connection
18 : with-pooled-db ( pool quot -- )
19 '[ db-connection _ with-variable ] with-pooled-connection ; inline