hugsql.parser

parse

(parse sql)(parse sql {:keys [no-header file]})
Parse hugsql SQL string and return
sequence of statement definitions
of the form:
{:hdr {:name   ["my-query"]
       :doc    ["my doc string"]
       :command [":?"]
       :result [":1"]
       :file "sql/queries.sql"
       :line 12}
 :sql ["select * from emp where id = "
       {:type :v :name :id}]}

Throws clojure.lang.ExceptionInfo on error.