                               (read-columns rs [])
                                ))
 
-(defn retrieve-columns [spec tables]
+(defn- retrieve-columns [spec tables]
   (let [connection (DriverManager/getConnection (:connection-string spec))
         meta-data (.getMetaData connection)]
     (map (fn [table] 

(ns blutwurst.database 
  (:import (java.sql DriverManager JDBCType)))

(defn read-table-row [rs] { 
                          :name (.getString rs "TABLE_NAME") 
                          :schema (.getString rs "TABLE_SCHEM")
                          })


(defn build-table-list [rs result] 
                          (if (not (.next rs))
                            result
                            (recur rs (cons (read-table-row rs) result))
                          ))

(defn retrieve-tables [spec]
 (let [connection (DriverManager/getConnection (:connection-string spec))
       meta-data (.getMetaData connection)
       result-set (.getTables meta-data nil nil nil (into-array ["TABLE"]))

   result
 ))

(defn- string->boolean [input]
  (case input
    "YES" true
    "NO" false
    nil))

(defn- read-columns [rs result]
  (if (not (.next rs))
    result
    (recur rs (cons { 
