clojure jdbc:如何插入具有特定模式的 table?
clojure jdbc: how to insert into a table with a specific schema?
在url for jdbc clojure http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html
它给出了下面的例子来插入一个table
(jdbc/insert! db-spec :table {:col1 42 :col2 "123"}) ;; Create
但是对于像 postgresql 这样的数据库,它可能有一个非 public 模式,假设我已经创建了一个像模板这样的模式,那么如何插入到 template.mytable?
只需将 table 名称指定为 :template.mytable
或字符串 "template.mytable"
.
在url for jdbc clojure http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html
它给出了下面的例子来插入一个table
(jdbc/insert! db-spec :table {:col1 42 :col2 "123"}) ;; Create
但是对于像 postgresql 这样的数据库,它可能有一个非 public 模式,假设我已经创建了一个像模板这样的模式,那么如何插入到 template.mytable?
只需将 table 名称指定为 :template.mytable
或字符串 "template.mytable"
.