记录和TableRecord之间的JOOQ差异

发布于 2025-01-26 12:51:03 字数 215 浏览 2 评论 0 原文

我想知道JOOQ 记录 tableerecord 之间的区别。因此,例如用户 userrecord 。我可以看到这与某个表的实际无效性有关,但是为什么每个人都使用 tableerecord 以及我什么时候应该使用普通 record

谢谢!

I would like to know what the difference is between a jOOQ Record and a TableRecord. So for example a User and a UserRecord. I can see that it has something to do with the actual nullability of a certain table, but why does everyone use the TableRecord and when should I ever use the normal Record?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜宝宝 2025-02-02 12:51:03

有一个关于您的问题的手册页面:记录 vs. tableerecord 。简而言之:

  • 记录是所有JOOQ记录的通用超级类型。
  • tableecord 是一种特定的记录类型,可以与模式中的表相关联。这种类型通常由代码生成输出

因此,例如用户 userrecord

这可能是一个不同的问题。 JOOQ的代码生成器为每个表生成这些工件,具体取决于您的配置:

  • (例如用户)。您可以用它来构建键入安全jooq查询
  • tableerecord (例如 userrecord )。您可以将其用于
  • pojo 用户,但在其他软件包中)。您可以使用它将结果映射到简单的Pojos

There's a manual page about literally your question: Record vs. TableRecord. In short:

  • Record is the generic super type of all jOOQ records.
  • TableRecord is a specific type of record, which can be associated with a table in your schema. This type is typically extended by code generation output

So for example a User and a UserRecord

This might be a different question. jOOQ's code generator produces these artifacts for each table, depending on your configuration:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文