Liking cljdoc? Tell your friends :D

SQL query builder for clojure Build Status Clojars Project

A very simple SQL statement builder based on jsqlparser


Getting Started

Syntax checker

  1. Adding clj-sql-builder as dependency and refer to the parser task
  :dependencies '[[clj-sql-builder "0.0.2"]])

(require '[sql.parser :refer :all])
  1. Run the checker
boot parse-directory -d .

SQL statement builder

  1. Start REPL
boot repl
  1. Try SELECT statement with sql.builder
boot.user=> (require '[sql.builder :as b])
boot.user=> (-> (b/select-query ["a" "b"] "t")
               (b/add-where "where c = 3 and e = 14")
               (b/add-limit 2000 10)
"SELECT a, b FROM t WHERE c = 3 AND e = 14 LIMIT 2000 OFFSET 10"
  1. Try more complex statements


Can you improve this documentation?Edit on GitHub

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

× close