postgresql – 如何从clojureql查询postgres点类型?
发布时间:2020-12-13 16:42:20 所属栏目:百科 来源:网络整理
导读:如何从clojureql查询postgres Point类型?我希望使用PostGIS功能,但clojureql似乎并不包括这一点。 我不是clojureql的专家,但如果这个语法是正确的: (with-connection db (with-query-results rs ["select * from blogs"] ; rs will be a sequence of map
如何从clojureql查询postgres Point类型?我希望使用PostGIS功能,但clojureql似乎并不包括这一点。
我不是clojureql的专家,但如果这个语法是正确的:
(with-connection db (with-query-results rs ["select * from blogs"] ; rs will be a sequence of maps,; one for each record in the result set. (dorun (map #(println (:title %)) rs)))) (取自here) 为什么不尝试将rs更改为: select point[0] as x,point[1] as y from table 这将工作吗?我不确定它会,但如果这种Clojure的查询方式只是将查询转发到DB“asis”,您可以尝试使用PostGIS操作符。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |