]> gitweb.factorcode.org Git - factor.git/commitdiff
added with-mdb-pool, rewrote with-mdb-connection
authorSascha Matzke <sascha.matzke@didolo.org>
Tue, 10 Aug 2010 17:42:43 +0000 (19:42 +0200)
committerDoug Coleman <doug.coleman@gmail.com>
Tue, 28 Sep 2010 20:15:54 +0000 (15:15 -0500)
extra/mongodb/driver/driver.factor

index 0dd73aeda89921dbe51c213d366e6e2ced4c9974..eebfb10c5caeeac169d33564a6b5d378b88dd16f 100644 (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 ;