1 ! Copyright (C) 2008 Slava Pestov.
\r
2 ! See http://factorcode.org/license.txt for BSD license.
\r
3 USING: kernel accessors continuations namespaces destructors
\r
4 db db.private db.pools io.pools http.server http.server.filters ;
\r
7 TUPLE: db-persistence < filter-responder pool ;
\r
9 : <db-persistence> ( responder db -- responder' )
\r
10 <db-pool> db-persistence boa ;
\r
12 M: db-persistence call-responder*
\r
14 pool>> [ acquire-connection ] keep
\r
15 [ return-connection-later ] [ drop db-connection set ] 2bi
\r
17 [ call-next-method ] bi ;
\r