从 select 查询中删除 table 姓名

Remove table name from select queries

我正在使用 next.jdbcpostgres

当我查询 table 时,响应数据在键前添加了 table 名称。

accounts/email: "email",
accounts/created_on: "2020-09-20T09:33:23Z",
accounts/last_login: "2020-09-20T09:33:23Z"

我们如何获得

email: "email",
created_on: "2020-09-20T09:33:23Z",
last_login: "2020-09-20T09:33:23Z"

next.jdbc 的文档中对此进行了解释。 入门 指南展示了如何使用 as-unqualified-maps 生成器函数执行此操作。参见 https://cljdoc.org/d/seancorfield/next.jdbc/CURRENT/doc/getting-started#options--result-set-builders

但我强烈建议您习惯于在哈希映射中使用限定关键字:它们在 Clojure 中是惯用的,这就是为什么它们是 next.jdbc 中的默认值。