可用版本: Dev (3.21) | 最新 (3.20) | 3.19 | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13

解释器配置

适用于 ✅ 开源版   ✅ 专业版   ✅ 企业版

SQL 解释器 API 附带了多种设置来控制其行为。这些设置包括

  • interpreterDialect:解释器输入方言。此方言用于决定是否应在特定类型的实际内存数据库上进行 DDL 解释,还是使用 jOOQ 的内置 DDL 解释。
  • interpreterDelayForeignKeyDeclarations:解释器是否应延迟外键声明的应用(在这种情况下,可能存在前向引用)。
  • interpreterLocale:用于不区分大小写比较等的区域设置。
  • interpreterNameLookupCaseSensitivity:解释 SQL 时应应用的标识符大小写敏感性,具体取决于标识符是否被引用。
  • interpreterSearchPath:解释器使用的非限定模式对象的搜索路径。

示例配置

Settings settings = new Settings()
    .withInterpreterDialect(H2)                           // Defaults to DEFAULT
    .withInterpreterDelayForeignKeyDeclarations(true)     // Defaults to false
    .withInterpreterLocale(Locale.forLanguageTag("de"))   // Defaults to Locale.getDefault()
    .withInterpreterNameLookupCaseSensitivity(NEVER)      // Defaults to WHEN_QUOTED
    .withInterpreterSearchPath(...);                      // Defaults to an empty list

反馈

您对此页面有任何反馈吗?我们很乐意听取您的意见!

The jOOQ Logo