From e1b1abe2dea1787ebca86f48636e90c917bc8ba6 Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Tue, 11 Oct 2016 20:21:48 -0700 Subject: [PATCH] Pre: clarify comments. --- src/common/datomish/db.cljc | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/common/datomish/db.cljc b/src/common/datomish/db.cljc index 3fe7107d..f0d9c0d5 100644 --- a/src/common/datomish/db.cljc +++ b/src/common/datomish/db.cljc @@ -111,9 +111,12 @@ (in-transaction! [db chan-fn] - "Evaluate the given pair-chan `chan-fn` in an exclusive transaction. If it returns non-nil, - commit the transaction; otherwise, rollback the transaction. Returns a pair-chan resolving to - the pair-chan returned by `chan-fn`.") + "Evaluate the given `chan-fn` in an exclusive transaction. If it returns non-nil, + commit the transaction; otherwise, rollback the transaction. + + `chan-fn` should be a function of no arguments returning a pair-chan. + + Returns a pair-chan resolving to the same pair as the pair-chan returned by `chan-fn`.") ( db - query-context - (query/options-into-context limit order-by) - (query/find-into-context parsed)) + query-context + (query/options-into-context limit order-by) + (query/find-into-context parsed)) ;; We turn each row into either an array of values or an unadorned ;; value. The row-pair-transducer does this work.