Skip to content

Commit

Permalink
Clean up example code for select-reducible [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
camsaul authored Jan 17, 2018
1 parent e915a55 commit 49f8623
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/db-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,10 @@ could potentially return many rows, this could cause memory issues. `select-redu
but will return a reducible sequence instead of a vector. Using this, it's possible to consume the query results as they
are streamed from the database. Using this, you can avoid fully realizing the set of results in memory.

```
(transduce (filter complex-filter-logic-fn) serialize-to-http-response output-stream (db/select-reducible User :active true))
```clj
(transduce (filter complext-filter-logic-fn)
serialize-to-http-response
(db/select-reducible User :active true))
```

With `select-reducible`, rows are processed as they are streamed from the database.
Expand Down

0 comments on commit 49f8623

Please sign in to comment.