Skip to content

Adding support for clojure.java.jdbc/query's :as-arrays? key #116

Open
alexkyllo wants to merge 2 commits intokrisajenkins:masterfrom
alexkyllo:master
Open

Adding support for clojure.java.jdbc/query's :as-arrays? key #116
alexkyllo wants to merge 2 commits intokrisajenkins:masterfrom
alexkyllo:master

Conversation

@alexkyllo
Copy link
Copy Markdown

Fix for https://github.com/krisajenkins/yesql/issues/115
Allows passing through an :as-arrays? key to java.jdbc to get the results as a list of ordered vectors instead of unordered maps, in case the SQL statement column ordering matters to the client code.

Example:

(find-older-than {:age 20})
;=> ({:age 21, :name "Betty", :person_id 1} {:age 22, :name "Betsy", :person_id 2} {:age 23, :name "Becky", :person_id 3})

(find-older-than {:age 20} {:as-arrays? true})
;=> ([:person_id :name :age] [1 "Betty" 21] [2 "Betsy" 22] [3 "Becky" 23])

@slitsche
Copy link
Copy Markdown

+1

2 similar comments
@alexeyklyukin
Copy link
Copy Markdown

+1

@avaczi
Copy link
Copy Markdown

avaczi commented Mar 3, 2016

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants