(refer-clojure :exclude '[distinct group-by update]) (require '[clojure.string :as s] '[sqlingvo.core :as c :refer [db sql select from where copy as group-by having insert intersect join refresh-materialized-view update returning truncate union values drop-table except ast delete explain drop-materialized-view]] '[sqlingvo.util :as util]) (def db (db :mysql))

Click here to make these examples interactive with ClojureScript.

sqlingvo.compiler

compile-2-ary

(compile-2-ary db node)

Compile a 2-arity SQL function node into a SQL statement.

compile-aggregate-expression

(compile-aggregate-expression db node)

Compile an aggregate expression to SQL.

compile-column

(compile-column db column)

compile-complex-args

(compile-complex-args db node)

compile-const

multimethod

Compile a SQL constant into a SQL statement.

compile-explain-option

multimethod

Compile an EXPLAIN option.

compile-explain-options

(compile-explain-options db options)

Compile the EXPLAIN options.

compile-expr

multimethod

Compile a SQL expression.

compile-exprs

(compile-exprs db exprs)

compile-fn

multimethod

Compile a SQL function node into a SQL statement.

compile-from

multimethod

compile-infix

(compile-infix db node)

Compile a SQL infix function node into a SQL statement.

compile-inline

(compile-inline db node)

compile-row

(compile-row db row)

compile-sql

multimethod

Compile the ast into SQL.

compile-sql-join

(compile-sql-join db separator args)

compile-stmt

(compile-stmt {:keys [db], :as stmt})

Compile stmt into a clojure.java.jdbc compatible prepared statement vector.

compile-whitespace-args

(compile-whitespace-args db node)

concat-sql

(concat-sql & args)

defarity

macro

(defarity arity-fn & fns)

Define SQL functions in terms of arity-fn.

join-sql

(join-sql separator args)

keyword-sql

(keyword-sql k)

to-sql

(to-sql arg)

unwrap-stmt

(unwrap-stmt stmt)

wrap-stmt

(wrap-stmt stmt)