Permalink
Browse files

sql: add db-get-tables

  • Loading branch information...
1 parent 47ca09a commit 4b7ca1275029a6de7aa4f57e693da6e74f54e162 @scgilardi scgilardi committed Jan 4, 2009
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/clojure/contrib/sql/test.clj
View
8 src/clojure/contrib/sql/test.clj
@@ -80,6 +80,14 @@
(doseq [rec res]
(println rec))))))
+(defn db-get-tables []
+ (sql/with-connection db
+ (into []
+ (resultset-seq
+ (.getTables
+ (.getMetaData (sql/connection))
+ nil nil nil (into-array ["TABLE" "VIEW"]))))))
+
(defn db-exception []
(sql/with-connection db
(sql/transaction

0 comments on commit 4b7ca12

Please sign in to comment.