-
-
Save tgoossens/1c4506e7c36b4409fbe4 to your computer and use it in GitHub Desktop.
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
(defn otable-populate! | |
"Populate the table with tuples from OTable" | |
[conn ^com.ooliba.core.model.OTable t name] | |
(doseq [key (.getAllKeys t)] | |
(let [tuple (.getTuple t key)) | |
values (map #(-> tuple (.getValue %)) (.getAttributeNames tuple))] | |
(-> conn (.prepareStatement (query-insert name values)) .executeUpdate) | |
(-> conn .commit)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment