(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.url

format

(format db)

Format the db spec as a URL.

parse

(parse url)

Parse the database url with regular-expression and return the database spec. Returns nil if the URL does not match.

parse!

(parse! url)

Parse the database url with regular-expression and return the database spec. Throws an exception if url does not match.

regular-expression

The regular expression that matches a database URL.