【问题标题】:Postgres information_schema using jOOQ metaPostgres information_schema 使用 jOOQ 元
【发布时间】:2020-06-08 14:37:33
【问题描述】:

我正在学习 jOOQ,我完全是个菜鸟。 在尝试将 postgres 查询转换为 jOOQ 时,information_schema 遇到了一些问题。 我尝试使用它:https://www.jooq.org/javadoc/latest/org.jooq/org/jooq/Meta.html 没有运气。

例如对于一个有点像这样的语句

SELECT 1 FROM information_schema.tables

我希望DSLContext.meta().getSchemas() 能把我带到我想要的地方,但我错了。这不是 InformationSchema 的工作原理吗?

它以 Schema 对象的形式出现,但不确定如何将其作为 information_schema 访问

对不起,我完全是新手。 任何帮助将不胜感激。

【问题讨论】:

  • 你到底想做什么?
  • 我希望从 information_schema.tables 中获取 table_names 并与它们进行比较

标签: postgresql jooq information-schema


【解决方案1】:

您可能只是在寻找Meta.getTables()

【讨论】:

  • +1 谢谢!这就是我一直在寻找的东西,列是否也有类似的东西?
  • @kan7777:致电Table.fields()
猜你喜欢
  • 2021-03-07
  • 2019-11-02
  • 2017-02-08
  • 1970-01-01
  • 2018-10-14
  • 1970-01-01
  • 2019-07-09
  • 2014-09-23
相关资源
最近更新 更多