public static < A > A withQueryResult ( QueryResult res , Function < java . sql . Connection , A > f ) { return f . apply ( connection ( handleQuery ( ( x , y ) -> res ) ) ) ; }
Executes |f| using a connection accepting only queries and answering with |result| to any query .