Last active
December 20, 2015 12:59
-
-
Save viperscape/6135158 to your computer and use it in GitHub Desktop.
information schema to defentity in korma
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defentity INFORMATION_SCHEMA.tables) | |
(def tables (map #(get % :TABLE_NAME) | |
(select 'INFORMATION_SCHEMA.tables (fields :TABLE_NAME) | |
(where {:TABLE_TYPE "BASE TABLE"})))) ;notice the quote | |
(prn tables) | |
;(map #(def %) tables) ;additional concept | |
(map #(defentity %) tables) ;not sure this is required anymore | |
(select (first tables)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment