Review comment: args -> inputs.

This commit is contained in:
Richard Newman 2016-09-02 16:23:30 -07:00
parent 1197764949
commit 5424e61be4
2 changed files with 4 additions and 4 deletions

View file

@ -644,14 +644,14 @@
Returns a transduced channel of [result err] pairs. Returns a transduced channel of [result err] pairs.
Closes the channel when fully consumed." Closes the channel when fully consumed."
[db find options] [db find options]
(let [{:keys [limit order-by args]} options (let [{:keys [limit order-by inputs]} options
parsed (query/parse find) parsed (query/parse find)
context (-> db context (-> db
query-context query-context
(query/options-into-context limit order-by) (query/options-into-context limit order-by)
(query/find-into-context parsed)) (query/find-into-context parsed))
row-pair-transducer (projection/row-pair-transducer context) row-pair-transducer (projection/row-pair-transducer context)
sql (query/context->sql-string context args) sql (query/context->sql-string context inputs)
chan (chan 50 row-pair-transducer)] chan (chan 50 row-pair-transducer)]
(s/<?all-rows (.-sqlite-connection db) sql chan) (s/<?all-rows (.-sqlite-connection db) sql chan)

View file

@ -302,7 +302,7 @@
:where where} :where where}
{:limit limit {:limit limit
:order-by [[:_max_time :desc]] :order-by [[:_max_time :desc]]
:args {:since since}}))] :inputs {:since since}}))]
(map (fn [[uri title lastVisited]] (map (fn [[uri title lastVisited]]
{:uri uri :title title :lastVisited lastVisited}) {:uri uri :title title :lastVisited lastVisited})
rows))))) rows)))))
@ -318,7 +318,7 @@
:where :where
[?page :page/url ?url] [?page :page/url ?url]
[(get-else $ ?page :page/title "") ?title]] [(get-else $ ?page :page/title "") ?title]]
{:args {:url url}})))))) {:inputs {:url url}}))))))
;; Ensure that we can grow the schema over time. ;; Ensure that we can grow the schema over time.
(deftest-db test-schema-evolution conn (deftest-db test-schema-evolution conn