Skip to content

Commit

Permalink
Update src/toucan2/jdbc/read.clj
Browse files Browse the repository at this point in the history
  • Loading branch information
camsaul authored Nov 6, 2024
1 parent 44dc4b4 commit 4f1a199
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/toucan2/jdbc/read.clj
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,9 @@
a thunk that retrieves the column value of the current row from the result set."
[conn model ^ResultSet rset]
(let [n (.getColumnCount (.getMetaData rset))
thunks (vec (for [i (range n)]
(delay (make-column-thunk conn model rset (inc i)))))]
thunks (mapv (fn [i]
(delay (make-column-thunk conn model rset (inc i))))
(range n))]
(fn [i]
@(nth thunks (dec i)))))

Expand Down

0 comments on commit 4f1a199

Please sign in to comment.