added with-mdb-pool, rewrote with-mdb-connection

db4
Sascha Matzke 2010-08-10 19:42:43 +02:00 committed by Doug Coleman
parent 942fbe2666
commit 0a9ca2124e
1 changed files with 4 additions and 2 deletions

View File

@ -98,10 +98,12 @@ SYNTAX: r/ ( token -- mdbregexp )
[ <mdb-pool> ] dip
[ mdb-pool swap with-variable ] curry with-disposal ; inline
: with-mdb-connection ( quot -- )
[ mdb-pool get ] dip
: with-mdb-pool ( ..a mdb-pool quot -- ..b )
'[ _ with-connection ] with-pooled-connection ; inline
: with-mdb-connection ( quot -- )
[ mdb-pool get ] dip with-mdb-pool ; inline
: >id-selector ( assoc -- selector )
[ MDB_OID_FIELD swap at ] keep
H{ } clone [ set-at ] keep ;