如何从clojureql查询postgres Point类型?我希望使用PostGIS功能,但clojureql似乎不包括此功能。
发布于 2012-01-03 01:22:23
我不是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操作符。
https://stackoverflow.com/questions/6642695
复制相似问题