Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

clojure jdbc: how to insert into a table with a specific schema?

Tags:

clojure

jdbc

In the url for jdbc clojure http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html

It gives the following example to insert into a table

(jdbc/insert! db-spec :table {:col1 42 :col2 "123"}) ;; Create

But for database like postgresql, it could have a non-public schema, suppose I have created a schema like template, then how to insert into template.mytable?

like image 979
Daniel Wu Avatar asked Mar 29 '15 14:03

Daniel Wu


1 Answers

Just specify the table name as :template.mytable, or as the string "template.mytable".

like image 120
bsvingen Avatar answered Nov 03 '22 03:11

bsvingen