Skip to content

Instantly share code, notes, and snippets.

@mishok13 mishok13/gist:9324779
Last active Aug 29, 2015

Embed
What would you like to do?
=> \d test;
Table "public.test"
Column | Type | Modifiers
--------+---------+-----------
id | integer |
value | integer |
=> select * from test;
id | value
----+-------
1 | 1
2 | 3
3 | 10
(3 rows)
> (require '[honeysql.core :as sql.eng])
nil
> (require '[honeysql.helpers :as sql])
nil
> (defn test-query [conn]
(let [query (-> (apply sql/select [[(sql.eng/call :max :value) "value"]])
(sql/from :test)
sql.eng/build
(sql.eng/format :quoting :ansi))]
;; Where do I put .setFetchSize here?
(->> query
(jdbc/query conn)
first
:value)))
#'/test-query
> (test-query c)
10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.