                                         :result-set-fn vec)))
 
 (defn get-tables
+
   "Get tables from given JDBC URL
 
   (get-tables \"postgresql://localhost:5432/northwind?user=myuser&password=secret\""

  (:use [taoensso.timbre :only [trace debug info warn error fatal]]
        [clojure.walk]))

(defn tables-sqlmap
  "Returns database specific map, takes dbms and database parameters.

  (tables-sql \"postgresql\" \"northwind\")"

    (jdbc/get-connection url)
    (catch Exception e (warn e))))

(defn get-query

  "Build SQL query for selected tables

  (get-query url tables)"

  [url & tables]

  (map #(info (str % " " url)) tables))

(defn execute-query

  "Execute a query against the data base

  (exec-query url sqlmap)"

  [{url sqlmap}]

  (jdbc/query (sql/format sqlmap) :result-set-fn vec))
