Liking cljdoc? Tell your friends :D
Clojure only.

hugsql.parser


parseclj

(parse sql)
(parse sql {:keys [no-header file]})

Parse hugsql SQL string sql 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.

Parse hugsql SQL string `sql` 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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close