Guest User

Untitled

a guest
Mar 18th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. (def conn (java.sql.DriverManager/getConnection "jdbc:postgresql://localhost:5432/db", "", nil))
  2. (def ctx (org.jooq.impl.DSL/using conn org.jooq.SQLDialect/POSTGRES))
  3.  
  4. (defn parse-sql [query] (.parseQuery (.parser ctx) query))
  5. (defn select [body] (.select ctx body))
  6. (defn inline [value] (org.jooq.impl.DSL/inline value))
  7.  
  8. (def a (select (inline 1)))
  9. (def b (parse-sql "select 1"))
  10. (log/info a)
  11. (log/info b)
  12. (log/info (= a b))
Add Comment
Please, Sign In to add comment