clojure jdbc:如何插入具有特定模式的表? [英] clojure jdbc: how to insert into a table with a specific schema?
本文介绍了clojure jdbc:如何插入具有特定模式的表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在jdbc clojure的URL中 http://clojure-doc.org/ article / ecosystem / java_jdbc / home.html
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
但是对于像postgresql这样的数据库,它可能具有非公开模式,假设我创建了一个模式,例如模板,然后如何插入template.mytable?
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?
推荐答案
只需将表名指定为 :template.mytable
,或作为字符串 template.mytable
。
Just specify the table name as :template.mytable
, or as the string "template.mytable"
.
这篇关于clojure jdbc:如何插入具有特定模式的表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文