diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CatalogMappingType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CatalogMappingType.java index 17bb7e1a3c..f1b87b2d80 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CatalogMappingType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CatalogMappingType.java @@ -89,7 +89,7 @@ public class CatalogMappingType implements Serializable, XMLAppendable } /** - * Sets the value of the outputCatalogToDefault property. + * See also {@link Database#isOutputCatalogToDefault()} * * @param value * allowed object is @@ -129,6 +129,10 @@ public class CatalogMappingType implements Serializable, XMLAppendable return this; } + /** + * See also {@link Database#isOutputCatalogToDefault()} + * + */ public CatalogMappingType withOutputCatalogToDefault(Boolean value) { setOutputCatalogToDefault(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CommentType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CommentType.java index 5ab3df1a9d..79e3e38279 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CommentType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CommentType.java @@ -86,7 +86,7 @@ public class CommentType implements Serializable, XMLAppendable } /** - * Sets the value of the deprecated property. + * Whether the comment is a deprecation notice. * * @param value * allowed object is @@ -110,7 +110,7 @@ public class CommentType implements Serializable, XMLAppendable } /** - * Sets the value of the includeSchemaComment property. + * Whether the schema comment (if available) should be included and prepended to the message. * * @param value * allowed object is @@ -139,11 +139,19 @@ public class CommentType implements Serializable, XMLAppendable return this; } + /** + * Whether the comment is a deprecation notice. + * + */ public CommentType withDeprecated(Boolean value) { setDeprecated(value); return this; } + /** + * Whether the schema comment (if available) should be included and prepended to the message. + * + */ public CommentType withIncludeSchemaComment(Boolean value) { setIncludeSchemaComment(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CustomType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CustomType.java index 8944dc30cd..c626c46fd3 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CustomType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/CustomType.java @@ -142,7 +142,7 @@ public class CustomType implements Serializable, XMLAppendable } /** - * Sets the value of the auditInsertTimestamp property. + * @deprecated Use ForcedType only * * @param value * allowed object is @@ -168,7 +168,7 @@ public class CustomType implements Serializable, XMLAppendable } /** - * Sets the value of the auditInsertUser property. + * @deprecated Use ForcedType only * * @param value * allowed object is @@ -194,7 +194,7 @@ public class CustomType implements Serializable, XMLAppendable } /** - * Sets the value of the auditUpdateTimestamp property. + * @deprecated Use ForcedType only * * @param value * allowed object is @@ -220,7 +220,7 @@ public class CustomType implements Serializable, XMLAppendable } /** - * Sets the value of the auditUpdateUser property. + * @deprecated Use ForcedType only * * @param value * allowed object is @@ -264,7 +264,7 @@ public class CustomType implements Serializable, XMLAppendable } /** - * Sets the value of the genericConverter property. + * @deprecated Use ForcedType only * * @param value * allowed object is @@ -290,7 +290,7 @@ public class CustomType implements Serializable, XMLAppendable } /** - * Sets the value of the autoConverter property. + * @deprecated Use ForcedType only * * @param value * allowed object is @@ -316,7 +316,7 @@ public class CustomType implements Serializable, XMLAppendable } /** - * Sets the value of the enumConverter property. + * @deprecated Use ForcedType only * * @param value * allowed object is @@ -342,7 +342,7 @@ public class CustomType implements Serializable, XMLAppendable } /** - * Sets the value of the xmlConverter property. + * @deprecated Use ForcedType only * * @param value * allowed object is @@ -368,7 +368,7 @@ public class CustomType implements Serializable, XMLAppendable } /** - * Sets the value of the jsonConverter property. + * @deprecated Use ForcedType only * * @param value * allowed object is @@ -430,7 +430,7 @@ public class CustomType implements Serializable, XMLAppendable } /** - * Sets the value of the genericBinding property. + * @deprecated Use ForcedType only * * @param value * allowed object is @@ -482,21 +482,37 @@ public class CustomType implements Serializable, XMLAppendable return this; } + /** + * @deprecated Use ForcedType only + * + */ public CustomType withAuditInsertTimestamp(Boolean value) { setAuditInsertTimestamp(value); return this; } + /** + * @deprecated Use ForcedType only + * + */ public CustomType withAuditInsertUser(Boolean value) { setAuditInsertUser(value); return this; } + /** + * @deprecated Use ForcedType only + * + */ public CustomType withAuditUpdateTimestamp(Boolean value) { setAuditUpdateTimestamp(value); return this; } + /** + * @deprecated Use ForcedType only + * + */ public CustomType withAuditUpdateUser(Boolean value) { setAuditUpdateUser(value); return this; @@ -512,26 +528,46 @@ public class CustomType implements Serializable, XMLAppendable return this; } + /** + * @deprecated Use ForcedType only + * + */ public CustomType withGenericConverter(Boolean value) { setGenericConverter(value); return this; } + /** + * @deprecated Use ForcedType only + * + */ public CustomType withAutoConverter(Boolean value) { setAutoConverter(value); return this; } + /** + * @deprecated Use ForcedType only + * + */ public CustomType withEnumConverter(Boolean value) { setEnumConverter(value); return this; } + /** + * @deprecated Use ForcedType only + * + */ public CustomType withXmlConverter(Boolean value) { setXmlConverter(value); return this; } + /** + * @deprecated Use ForcedType only + * + */ public CustomType withJsonConverter(Boolean value) { setJsonConverter(value); return this; @@ -557,6 +593,10 @@ public class CustomType implements Serializable, XMLAppendable return this; } + /** + * @deprecated Use ForcedType only + * + */ public CustomType withGenericBinding(Boolean value) { setGenericBinding(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java index 6b611922f1..990acff8e1 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Database.java @@ -364,7 +364,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the regexMatchesPartialQualification property. + * Whether regular expressions that match qualified object names also match partial qualifications (e.g. `table\.column` matches `schema.table.column`) or only full and/or no qualifications (e.g. `schema\.table\.column` and `column` match `schema.table.column`) * * @param value * allowed object is @@ -388,7 +388,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the sqlMatchesPartialQualification property. + * Whether SQL queries that match qualified object names also match partial qualifications (e.g. `table\.column` matches `schema.table.column`) or only full and/or no qualifications (e.g. `schema\.table\.column` and `column` match `schema.table.column`) * * @param value * allowed object is @@ -544,7 +544,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeExcludeColumns property. + * This flag indicates whether include / exclude patterns should also match columns within tables. * * @param value * allowed object is @@ -568,7 +568,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeExcludePackageRoutines property. + * This flag indicates whether include / exclude patterns should also match routines within packages. * * @param value * allowed object is @@ -592,7 +592,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeTables property. + * This flag indicates whether tables should be included in output produced by this database * * @param value * allowed object is @@ -616,7 +616,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeEmbeddables property. + * This flag indicates whether embeddable types should be included in output produced by this database * * @param value * allowed object is @@ -640,7 +640,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeRoutines property. + * This flag indicates whether routines should be included in output produced by this database * * @param value * allowed object is @@ -664,7 +664,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeTriggerRoutines property. + * This flag indicates whether trigger implementation routines should be included in output produced by this database (e.g. in PostgreSQL) * * @param value * allowed object is @@ -688,7 +688,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includePackages property. + * This flag indicates whether packages should be included in output produced by this database * * @param value * allowed object is @@ -712,7 +712,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includePackageRoutines property. + * This flag indicates whether routines contained in packages should be included in output produced by this database * * @param value * allowed object is @@ -736,7 +736,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includePackageUDTs property. + * This flag indicates whether UDTs contained in packages should be included in output produced by this database * * @param value * allowed object is @@ -760,7 +760,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includePackageConstants property. + * This flag indicates whether constants contained in packages should be included in output produced by this database * * @param value * allowed object is @@ -784,7 +784,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeXMLSchemaCollections property. + * This flag indicates whether XML schema collections should be included in output produced by this database * * @param value * allowed object is @@ -808,7 +808,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeUDTs property. + * This flag indicates whether udts should be included in output produced by this database * * @param value * allowed object is @@ -832,7 +832,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeDomains property. + * This flag indicates whether domains should be included in output produced by this database * * @param value * allowed object is @@ -858,7 +858,9 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeTriggers property. + * This flag indicates whether triggers should be included in output produced by this database. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -882,7 +884,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeSequences property. + * This flag indicates whether sequences should be included in output produced by this database * * @param value * allowed object is @@ -906,7 +908,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeIndexes property. + * This flag indicates whether indexes should be included in output produced by this database * * @param value * allowed object is @@ -930,7 +932,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includePrimaryKeys property. + * This flag indicates whether primary keys should be included in output produced by this database * * @param value * allowed object is @@ -954,7 +956,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeUniqueKeys property. + * This flag indicates whether unique keys should be included in output produced by this database * * @param value * allowed object is @@ -978,7 +980,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeForeignKeys property. + * This flag indicates whether foreign keys should be included in output produced by this database * * @param value * allowed object is @@ -1002,7 +1004,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeCheckConstraints property. + * This flag indicates whether check constraints should be included in output produced by this database * * @param value * allowed object is @@ -1026,7 +1028,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeSystemTables property. + * This flag indicates whether system tables should be included in output produced by this database * * @param value * allowed object is @@ -1050,7 +1052,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeSystemIndexes property. + * This flag indicates whether system generated indexes should be included in output produced by this database * * @param value * allowed object is @@ -1074,7 +1076,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeSystemCheckConstraints property. + * This flag indicates whether system generated check constraints should be included in output produced by this database * * @param value * allowed object is @@ -1098,7 +1100,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeSystemSequences property. + * This flag indicates whether system generated sequences should be included in output produced by this database * * @param value * allowed object is @@ -1122,7 +1124,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeSystemUDTs property. + * This flag indicates whether system generated UDTs should be included in output produced by this database * * @param value * allowed object is @@ -1146,7 +1148,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the includeInvisibleColumns property. + * This flag indicates whether invisible columns should be included in output produced by this database * * @param value * allowed object is @@ -1330,7 +1332,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the dateAsTimestamp property. + * Generate {@link java.sql.Timestamp} fields for DATE columns. This is particularly useful for Oracle databases * * @param value * allowed object is @@ -1363,7 +1365,15 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the ignoreProcedureReturnValues property. + * Ignore procedure return values in Transact-SQL generated code. + *

+ * In jOOQ 3.6.0, #4106 was implemented to support Transact-SQL's + * optional return values from stored procedures. This turns all procedures + * into Routine (instead of Routine). For backwards- + * compatibility reasons, users can suppress this change in jOOQ 3.x + *

+ * @deprecated This feature is deprecated as of jOOQ 3.6.0 and will be removed again in + * jOOQ 4.0. * * @param value * allowed object is @@ -1388,7 +1398,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the unsignedTypes property. + * Generate jOOU data types for your unsigned data types, which are not natively supported in Java * * @param value * allowed object is @@ -1412,7 +1422,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the integerDisplayWidths property. + * Include display width in type declaration. In some RDBMS (e.g. MariaDB, MySQL), fixed width integer types are optionally accompanied by a display width. This is sometimes abused to model BOOLEAN types via TINYINT(1). This flag allows for including that display width in the type declaration exposed by jOOQ-meta code, as if it were a numeric precision. * * @param value * allowed object is @@ -1487,7 +1497,8 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the outputCatalogToDefault property. + * A flag to indicate that the outputCatalog should be the "default" catalog, + * which generates catalog-less, unqualified tables, procedures, etc. * * @param value * allowed object is @@ -1562,7 +1573,8 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the outputSchemaToDefault property. + * A flag to indicate that the outputSchema should be the "default" schema, + * which generates schema-less, unqualified tables, procedures, etc. * * @param value * allowed object is @@ -1750,7 +1762,9 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the readonlyIdentities property. + * Whether identity columns should expose {@link org.jooq.DataType#readonly()} behaviour. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1776,7 +1790,9 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the readonlyComputedColumns property. + * Whether computed columns should expose {@link org.jooq.DataType#readonly()} behaviour. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1802,7 +1818,9 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the readonlyNonUpdatableColumns property. + * Whether columns that are known not to be updatable (e.g. in views) should expose {@link org.jooq.DataType#readonly()} behaviour. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1826,7 +1844,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the forcedTypesForBuiltinDataTypeExtensions property. + * Enable some default forced type configurations for built in data type extensions, such as the ones from the jooq-postgres-extensions module. * * @param value * allowed object is @@ -1852,7 +1870,9 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the forcedTypesForXMLSchemaCollections property. + * Enable some default forced type configurations for XML schema collections, mapping them to JAXB annotated types using the {@link org.jooq.impl.XMLtoJAXBConverter} + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1876,7 +1896,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the forceIntegerTypesOnZeroScaleDecimals property. + * Historically, zero-scale decimal types are generated as their most appropriate, corresponding integer type (e.g. NUMBER(2, 0) and less: Byte). This allows for turning off this feature. In case of conflict between this rule and actual {@link #getForcedTypes()}, the latter will win. * * @param value * allowed object is @@ -1908,7 +1928,15 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the tableValuedFunctions property. + * Whether table valued functions should be reported as tables. + *

+ * If this is deactivated, such functions are not generated as tables, but + * as ordinary routines. This is particularly useful for backwards- + * compatibility between jOOQ 3.8 and previous versions, when using TABLE + * and VARRAY types in Oracle. + *

+ * While this flag defaults to true for most databases, it defaults to false + * for Oracle. * * @param value * allowed object is @@ -1932,7 +1960,7 @@ public class Database implements Serializable, XMLAppendable } /** - * Sets the value of the oracleUseDBAViews property. + * Specify whether to use the Oracle DBA_XYZ views instead of the ALL_XYZ views. * * @param value * allowed object is @@ -2192,11 +2220,19 @@ public class Database implements Serializable, XMLAppendable return this; } + /** + * Whether regular expressions that match qualified object names also match partial qualifications (e.g. `table\.column` matches `schema.table.column`) or only full and/or no qualifications (e.g. `schema\.table\.column` and `column` match `schema.table.column`) + * + */ public Database withRegexMatchesPartialQualification(Boolean value) { setRegexMatchesPartialQualification(value); return this; } + /** + * Whether SQL queries that match qualified object names also match partial qualifications (e.g. `table\.column` matches `schema.table.column`) or only full and/or no qualifications (e.g. `schema\.table\.column` and `column` match `schema.table.column`) + * + */ public Database withSqlMatchesPartialQualification(Boolean value) { setSqlMatchesPartialQualification(value); return this; @@ -2272,131 +2308,237 @@ public class Database implements Serializable, XMLAppendable return this; } + /** + * This flag indicates whether include / exclude patterns should also match columns within tables. + * + */ public Database withIncludeExcludeColumns(Boolean value) { setIncludeExcludeColumns(value); return this; } + /** + * This flag indicates whether include / exclude patterns should also match routines within packages. + * + */ public Database withIncludeExcludePackageRoutines(Boolean value) { setIncludeExcludePackageRoutines(value); return this; } + /** + * This flag indicates whether tables should be included in output produced by this database + * + */ public Database withIncludeTables(Boolean value) { setIncludeTables(value); return this; } + /** + * This flag indicates whether embeddable types should be included in output produced by this database + * + */ public Database withIncludeEmbeddables(Boolean value) { setIncludeEmbeddables(value); return this; } + /** + * This flag indicates whether routines should be included in output produced by this database + * + */ public Database withIncludeRoutines(Boolean value) { setIncludeRoutines(value); return this; } + /** + * This flag indicates whether trigger implementation routines should be included in output produced by this database (e.g. in PostgreSQL) + * + */ public Database withIncludeTriggerRoutines(Boolean value) { setIncludeTriggerRoutines(value); return this; } + /** + * This flag indicates whether packages should be included in output produced by this database + * + */ public Database withIncludePackages(Boolean value) { setIncludePackages(value); return this; } + /** + * This flag indicates whether routines contained in packages should be included in output produced by this database + * + */ public Database withIncludePackageRoutines(Boolean value) { setIncludePackageRoutines(value); return this; } + /** + * This flag indicates whether UDTs contained in packages should be included in output produced by this database + * + */ public Database withIncludePackageUDTs(Boolean value) { setIncludePackageUDTs(value); return this; } + /** + * This flag indicates whether constants contained in packages should be included in output produced by this database + * + */ public Database withIncludePackageConstants(Boolean value) { setIncludePackageConstants(value); return this; } + /** + * This flag indicates whether XML schema collections should be included in output produced by this database + * + */ public Database withIncludeXMLSchemaCollections(Boolean value) { setIncludeXMLSchemaCollections(value); return this; } + /** + * This flag indicates whether udts should be included in output produced by this database + * + */ public Database withIncludeUDTs(Boolean value) { setIncludeUDTs(value); return this; } + /** + * This flag indicates whether domains should be included in output produced by this database + * + */ public Database withIncludeDomains(Boolean value) { setIncludeDomains(value); return this; } + /** + * This flag indicates whether triggers should be included in output produced by this database. + *

+ * This feature is available in the commercial distribution only. + * + */ public Database withIncludeTriggers(Boolean value) { setIncludeTriggers(value); return this; } + /** + * This flag indicates whether sequences should be included in output produced by this database + * + */ public Database withIncludeSequences(Boolean value) { setIncludeSequences(value); return this; } + /** + * This flag indicates whether indexes should be included in output produced by this database + * + */ public Database withIncludeIndexes(Boolean value) { setIncludeIndexes(value); return this; } + /** + * This flag indicates whether primary keys should be included in output produced by this database + * + */ public Database withIncludePrimaryKeys(Boolean value) { setIncludePrimaryKeys(value); return this; } + /** + * This flag indicates whether unique keys should be included in output produced by this database + * + */ public Database withIncludeUniqueKeys(Boolean value) { setIncludeUniqueKeys(value); return this; } + /** + * This flag indicates whether foreign keys should be included in output produced by this database + * + */ public Database withIncludeForeignKeys(Boolean value) { setIncludeForeignKeys(value); return this; } + /** + * This flag indicates whether check constraints should be included in output produced by this database + * + */ public Database withIncludeCheckConstraints(Boolean value) { setIncludeCheckConstraints(value); return this; } + /** + * This flag indicates whether system tables should be included in output produced by this database + * + */ public Database withIncludeSystemTables(Boolean value) { setIncludeSystemTables(value); return this; } + /** + * This flag indicates whether system generated indexes should be included in output produced by this database + * + */ public Database withIncludeSystemIndexes(Boolean value) { setIncludeSystemIndexes(value); return this; } + /** + * This flag indicates whether system generated check constraints should be included in output produced by this database + * + */ public Database withIncludeSystemCheckConstraints(Boolean value) { setIncludeSystemCheckConstraints(value); return this; } + /** + * This flag indicates whether system generated sequences should be included in output produced by this database + * + */ public Database withIncludeSystemSequences(Boolean value) { setIncludeSystemSequences(value); return this; } + /** + * This flag indicates whether system generated UDTs should be included in output produced by this database + * + */ public Database withIncludeSystemUDTs(Boolean value) { setIncludeSystemUDTs(value); return this; } + /** + * This flag indicates whether invisible columns should be included in output produced by this database + * + */ public Database withIncludeInvisibleColumns(Boolean value) { setIncludeInvisibleColumns(value); return this; @@ -2488,21 +2630,45 @@ public class Database implements Serializable, XMLAppendable return this; } + /** + * Generate {@link java.sql.Timestamp} fields for DATE columns. This is particularly useful for Oracle databases + * + */ public Database withDateAsTimestamp(Boolean value) { setDateAsTimestamp(value); return this; } + /** + * Ignore procedure return values in Transact-SQL generated code. + *

+ * In jOOQ 3.6.0, #4106 was implemented to support Transact-SQL's + * optional return values from stored procedures. This turns all procedures + * into Routine (instead of Routine). For backwards- + * compatibility reasons, users can suppress this change in jOOQ 3.x + *

+ * @deprecated This feature is deprecated as of jOOQ 3.6.0 and will be removed again in + * jOOQ 4.0. + * + */ public Database withIgnoreProcedureReturnValues(Boolean value) { setIgnoreProcedureReturnValues(value); return this; } + /** + * Generate jOOU data types for your unsigned data types, which are not natively supported in Java + * + */ public Database withUnsignedTypes(Boolean value) { setUnsignedTypes(value); return this; } + /** + * Include display width in type declaration. In some RDBMS (e.g. MariaDB, MySQL), fixed width integer types are optionally accompanied by a display width. This is sometimes abused to model BOOLEAN types via TINYINT(1). This flag allows for including that display width in the type declaration exposed by jOOQ-meta code, as if it were a numeric precision. + * + */ public Database withIntegerDisplayWidths(Boolean value) { setIntegerDisplayWidths(value); return this; @@ -2535,6 +2701,11 @@ public class Database implements Serializable, XMLAppendable return this; } + /** + * A flag to indicate that the outputCatalog should be the "default" catalog, + * which generates catalog-less, unqualified tables, procedures, etc. + * + */ public Database withOutputCatalogToDefault(Boolean value) { setOutputCatalogToDefault(value); return this; @@ -2567,6 +2738,11 @@ public class Database implements Serializable, XMLAppendable return this; } + /** + * A flag to indicate that the outputSchema should be the "default" schema, + * which generates schema-less, unqualified tables, procedures, etc. + * + */ public Database withOutputSchemaToDefault(Boolean value) { setOutputSchemaToDefault(value); return this; @@ -2659,41 +2835,89 @@ public class Database implements Serializable, XMLAppendable return this; } + /** + * Whether identity columns should expose {@link org.jooq.DataType#readonly()} behaviour. + *

+ * This feature is available in the commercial distribution only. + * + */ public Database withReadonlyIdentities(Boolean value) { setReadonlyIdentities(value); return this; } + /** + * Whether computed columns should expose {@link org.jooq.DataType#readonly()} behaviour. + *

+ * This feature is available in the commercial distribution only. + * + */ public Database withReadonlyComputedColumns(Boolean value) { setReadonlyComputedColumns(value); return this; } + /** + * Whether columns that are known not to be updatable (e.g. in views) should expose {@link org.jooq.DataType#readonly()} behaviour. + *

+ * This feature is available in the commercial distribution only. + * + */ public Database withReadonlyNonUpdatableColumns(Boolean value) { setReadonlyNonUpdatableColumns(value); return this; } + /** + * Enable some default forced type configurations for built in data type extensions, such as the ones from the jooq-postgres-extensions module. + * + */ public Database withForcedTypesForBuiltinDataTypeExtensions(Boolean value) { setForcedTypesForBuiltinDataTypeExtensions(value); return this; } + /** + * Enable some default forced type configurations for XML schema collections, mapping them to JAXB annotated types using the {@link org.jooq.impl.XMLtoJAXBConverter} + *

+ * This feature is available in the commercial distribution only. + * + */ public Database withForcedTypesForXMLSchemaCollections(Boolean value) { setForcedTypesForXMLSchemaCollections(value); return this; } + /** + * Historically, zero-scale decimal types are generated as their most appropriate, corresponding integer type (e.g. NUMBER(2, 0) and less: Byte). This allows for turning off this feature. In case of conflict between this rule and actual {@link #getForcedTypes()}, the latter will win. + * + */ public Database withForceIntegerTypesOnZeroScaleDecimals(Boolean value) { setForceIntegerTypesOnZeroScaleDecimals(value); return this; } + /** + * Whether table valued functions should be reported as tables. + *

+ * If this is deactivated, such functions are not generated as tables, but + * as ordinary routines. This is particularly useful for backwards- + * compatibility between jOOQ 3.8 and previous versions, when using TABLE + * and VARRAY types in Oracle. + *

+ * While this flag defaults to true for most databases, it defaults to false + * for Oracle. + * + */ public Database withTableValuedFunctions(Boolean value) { setTableValuedFunctions(value); return this; } + /** + * Specify whether to use the Oracle DBA_XYZ views instead of the ALL_XYZ views. + * + */ public Database withOracleUseDBAViews(Boolean value) { setOracleUseDBAViews(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableDefinitionType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableDefinitionType.java index 7ae243b9ed..daf1475c8e 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableDefinitionType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/EmbeddableDefinitionType.java @@ -178,7 +178,7 @@ public class EmbeddableDefinitionType implements Serializable, XMLAppendable } /** - * Sets the value of the replacesFields property. + * Specify that the embeddable field replaces its underlying fields in code generation output, and when working with asterisks. * * @param value * allowed object is @@ -263,6 +263,10 @@ public class EmbeddableDefinitionType implements Serializable, XMLAppendable return this; } + /** + * Specify that the embeddable field replaces its underlying fields in code generation output, and when working with asterisks. + * + */ public EmbeddableDefinitionType withReplacesFields(Boolean value) { setReplacesFields(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ForcedType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ForcedType.java index 6c7e3cca6a..858a7feddd 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ForcedType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/ForcedType.java @@ -197,7 +197,11 @@ public class ForcedType implements Serializable, XMLAppendable } /** - * Sets the value of the auditInsertTimestamp property. + * Whether this column acts as an audit {@link org.jooq.GeneratorStatementType#INSERT} timestamp. + *

+ * This flag produces a {@link #generator} configuration, so it cannot be combined with a custom generator. The different audit flags are mutually exclusive. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -225,7 +229,11 @@ public class ForcedType implements Serializable, XMLAppendable } /** - * Sets the value of the auditInsertUser property. + * Whether this column acts as an audit {@link org.jooq.GeneratorStatementType#INSERT} timestamp. + *

+ * This flag produces a {@link #generator} configuration, so it cannot be combined with a custom generator. The different audit flags are mutually exclusive. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -253,7 +261,11 @@ public class ForcedType implements Serializable, XMLAppendable } /** - * Sets the value of the auditUpdateTimestamp property. + * Whether this column acts as an audit {@link org.jooq.GeneratorStatementType#UPDATE} timestamp. + *

+ * This flag produces a {@link #generator} configuration, so it cannot be combined with a custom generator. The different audit flags are mutually exclusive. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -281,7 +293,11 @@ public class ForcedType implements Serializable, XMLAppendable } /** - * Sets the value of the auditUpdateUser property. + * Whether this column acts as an audit {@link org.jooq.GeneratorStatementType#UPDATE} timestamp. + *

+ * This flag produces a {@link #generator} configuration, so it cannot be combined with a custom generator. The different audit flags are mutually exclusive. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -321,7 +337,7 @@ public class ForcedType implements Serializable, XMLAppendable } /** - * Sets the value of the genericConverter property. + * Whether the converter is generic, receiving <T, U> type variables as well as Class<T> and Class<U> constructor arguments. * * @param value * allowed object is @@ -345,7 +361,7 @@ public class ForcedType implements Serializable, XMLAppendable } /** - * Sets the value of the autoConverter property. + * Whether the converter is an {@link org.jooq.impl.AutoConverter}. * * @param value * allowed object is @@ -369,7 +385,7 @@ public class ForcedType implements Serializable, XMLAppendable } /** - * Sets the value of the enumConverter property. + * Whether the converter is an {@link org.jooq.impl.EnumConverter}. * * @param value * allowed object is @@ -393,7 +409,7 @@ public class ForcedType implements Serializable, XMLAppendable } /** - * Sets the value of the xmlConverter property. + * Whether the converter is an {@link org.jooq.impl.XMLtoJAXBConverter}. * * @param value * allowed object is @@ -417,7 +433,7 @@ public class ForcedType implements Serializable, XMLAppendable } /** - * Sets the value of the jsonConverter property. + * Whether the converter is an {@link org.jooq.jackson.extensions.converters.JSONtoJacksonConverter} or a {@link org.jooq.jackson.extensions.converters.JSONtoJacksonConverter}. * * @param value * allowed object is @@ -473,7 +489,7 @@ public class ForcedType implements Serializable, XMLAppendable } /** - * Sets the value of the genericBinding property. + * Whether the binding is generic, receiving <T, U> type variables as well as Class<T> and Class<U> constructor arguments. * * @param value * allowed object is @@ -714,21 +730,53 @@ public class ForcedType implements Serializable, XMLAppendable return this; } + /** + * Whether this column acts as an audit {@link org.jooq.GeneratorStatementType#INSERT} timestamp. + *

+ * This flag produces a {@link #generator} configuration, so it cannot be combined with a custom generator. The different audit flags are mutually exclusive. + *

+ * This feature is available in the commercial distribution only. + * + */ public ForcedType withAuditInsertTimestamp(Boolean value) { setAuditInsertTimestamp(value); return this; } + /** + * Whether this column acts as an audit {@link org.jooq.GeneratorStatementType#INSERT} timestamp. + *

+ * This flag produces a {@link #generator} configuration, so it cannot be combined with a custom generator. The different audit flags are mutually exclusive. + *

+ * This feature is available in the commercial distribution only. + * + */ public ForcedType withAuditInsertUser(Boolean value) { setAuditInsertUser(value); return this; } + /** + * Whether this column acts as an audit {@link org.jooq.GeneratorStatementType#UPDATE} timestamp. + *

+ * This flag produces a {@link #generator} configuration, so it cannot be combined with a custom generator. The different audit flags are mutually exclusive. + *

+ * This feature is available in the commercial distribution only. + * + */ public ForcedType withAuditUpdateTimestamp(Boolean value) { setAuditUpdateTimestamp(value); return this; } + /** + * Whether this column acts as an audit {@link org.jooq.GeneratorStatementType#UPDATE} timestamp. + *

+ * This flag produces a {@link #generator} configuration, so it cannot be combined with a custom generator. The different audit flags are mutually exclusive. + *

+ * This feature is available in the commercial distribution only. + * + */ public ForcedType withAuditUpdateUser(Boolean value) { setAuditUpdateUser(value); return this; @@ -743,26 +791,46 @@ public class ForcedType implements Serializable, XMLAppendable return this; } + /** + * Whether the converter is generic, receiving <T, U> type variables as well as Class<T> and Class<U> constructor arguments. + * + */ public ForcedType withGenericConverter(Boolean value) { setGenericConverter(value); return this; } + /** + * Whether the converter is an {@link org.jooq.impl.AutoConverter}. + * + */ public ForcedType withAutoConverter(Boolean value) { setAutoConverter(value); return this; } + /** + * Whether the converter is an {@link org.jooq.impl.EnumConverter}. + * + */ public ForcedType withEnumConverter(Boolean value) { setEnumConverter(value); return this; } + /** + * Whether the converter is an {@link org.jooq.impl.XMLtoJAXBConverter}. + * + */ public ForcedType withXmlConverter(Boolean value) { setXmlConverter(value); return this; } + /** + * Whether the converter is an {@link org.jooq.jackson.extensions.converters.JSONtoJacksonConverter} or a {@link org.jooq.jackson.extensions.converters.JSONtoJacksonConverter}. + * + */ public ForcedType withJsonConverter(Boolean value) { setJsonConverter(value); return this; @@ -786,6 +854,10 @@ public class ForcedType implements Serializable, XMLAppendable return this; } + /** + * Whether the binding is generic, receiving <T, U> type variables as well as Class<T> and Class<U> constructor arguments. + * + */ public ForcedType withGenericBinding(Boolean value) { setGenericBinding(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java index 4bb6181dbb..d32f29585f 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Generate.java @@ -280,7 +280,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the indexes property. + * Generate index information. * * @param value * allowed object is @@ -305,7 +305,8 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the relations property. + * Primary key / foreign key relations should be generated and used. + * This is a prerequisite for various advanced features * * @param value * allowed object is @@ -329,7 +330,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the sequenceFlags property. + * Sequence flags should be generated and used. * * @param value * allowed object is @@ -353,7 +354,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the udtPaths property. + * Generate UDT path expressions on tables and on UDTs. * * @param value * allowed object is @@ -377,7 +378,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the implicitJoinPathsToOne property. + * Generate implicit join path constructors on generated tables for outgoing foreign key relationships (to-one relationships) * * @param value * allowed object is @@ -401,7 +402,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the implicitJoinPathsToMany property. + * Generate implicit join path constructors on generated tables for incoming foreign key relationships (to-many relationships) * * @param value * allowed object is @@ -425,7 +426,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the implicitJoinPathTableSubtypes property. + * Generate implicit join path table subtypes implementing {@link org.jooq.Path} for increased JOIN convenience. * * @param value * allowed object is @@ -449,7 +450,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the implicitJoinPathUnusedConstructors property. + * Generate implicit join path constructors also if there isn't any outgoing or incoming foreign key relationship. * * @param value * allowed object is @@ -483,7 +484,17 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the implicitJoinPathsUseTableNameForUnambiguousFKs property. + * Whether names of unambiguous {@link org.jooq.meta.ForeignKeyDefinition} should be based + * on the referenced {@link org.jooq.meta.TableDefinition}. + *

+ * When a child table has only one {@link org.jooq.meta.ForeignKeyDefinition} towards a + * parent table, then that path is "unambiguous." In that case, some + * {@link GeneratorStrategy} implementations may choose to use the parent + * table's {@link org.jooq.meta.TableDefinition} for implementations of + * {@link org.jooq.codegen.GeneratorStrategy#getJavaMethodName(Definition)}, instead of the + * {@link org.jooq.meta.ForeignKeyDefinition}, e.g. for implicit join paths. + *

+ * This flag allows for turning off this default behaviour. * * @param value * allowed object is @@ -507,7 +518,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the implicitJoinPathsAsKotlinProperties property. + * Whether implicit join path constructors should be offered as properties in Kotlin. * * @param value * allowed object is @@ -531,7 +542,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the deprecated property. + * Generate deprecated code for backwards compatibility * * @param value * allowed object is @@ -557,7 +568,9 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the deprecationOnUnknownTypes property. + * Generate deprecation annotations on references to unknown data types. + * This helps to identify columns, attributes, and parameters, which may not be usable through + * jOOQ API, without adding custom data type bindings to them. * * @param value * allowed object is @@ -582,7 +595,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the instanceFields property. + * @deprecated * * @param value * allowed object is @@ -624,7 +637,8 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the generatedAnnotation property. + * Generate the {@link javax.annotation.processing.Generated} annotation to indicate + * jOOQ version used for source code. * * @param value * allowed object is @@ -666,7 +680,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the generatedAnnotationDate property. + * Whether the {@link javax.annotation.processing.Generated} annotation should include the date attribute. * * @param value * allowed object is @@ -690,7 +704,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the generatedAnnotationJooqVersion property. + * Whether the {@link javax.annotation.processing.Generated} annotation should include the jOOQ version. * * @param value * allowed object is @@ -714,7 +728,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the nonnullAnnotation property. + * Whether non-nullable items should be annotated with the annotation type specified in {@link #nonnullAnnotationType}. In SQL and by consequence in jOOQ, non-nullability cannot be guaranteed statically. There may still be some cases (e.g. after unions, outer joins, etc.) where a normally non-null value turns out to be null! * * @param value * allowed object is @@ -754,7 +768,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the nullableAnnotation property. + * Whether nullable items should be annotated with the annotation type specified in {@link #nullableAnnotationType}. Unlike {@link #nonnullAnnotation}, nullability can be guaranteed as in SQL, and by consequence in jOOQ, every column expression can be made nullable using some SQL operation. * * @param value * allowed object is @@ -794,7 +808,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the constructorPropertiesAnnotation property. + * Generate the {@link java.beans.ConstructorProperties} annotation on generated POJOs and/or records. * * @param value * allowed object is @@ -818,7 +832,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the constructorPropertiesAnnotationOnPojos property. + * Generate the {@link java.beans.ConstructorProperties} annotation on generated POJOs (defaults to true if {@link #constructorPropertiesAnnotation} is active). * * @param value * allowed object is @@ -842,7 +856,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the constructorPropertiesAnnotationOnRecords property. + * Generate the {@link java.beans.ConstructorProperties} annotation on generated records (defaults to true if {@link #constructorPropertiesAnnotation} is active). * * @param value * allowed object is @@ -866,7 +880,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the routines property. + * Generate Routine classes. * * @param value * allowed object is @@ -890,7 +904,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the sequences property. + * Generate Sequence classes. * * @param value * allowed object is @@ -914,7 +928,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the triggers property. + * Generate Trigger classes. * * @param value * allowed object is @@ -938,7 +952,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the udts property. + * Generate UDT classes. * * @param value * allowed object is @@ -962,7 +976,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the queues property. + * Generate Queue classes. * * @param value * allowed object is @@ -986,7 +1000,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the links property. + * Generate database Link classes. * * @param value * allowed object is @@ -1010,7 +1024,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the keys property. + * Generate Key classes. * * @param value * allowed object is @@ -1034,7 +1048,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the tables property. + * Generate Table classes. * * @param value * allowed object is @@ -1058,7 +1072,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the embeddables property. + * Generate embeddable classes. * * @param value * allowed object is @@ -1082,7 +1096,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the records property. + * Generate TableRecord classes. * * @param value * allowed object is @@ -1106,7 +1120,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the recordsImplementingRecordN property. + * Generate TableRecord classes that implement Record[N] super types * * @param value * allowed object is @@ -1131,7 +1145,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the enumsAsScalaSealedTraits property. + * @deprecated Activate the legacy Scala sealed trait enum emulation * * @param value * allowed object is @@ -1156,7 +1170,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the pojos property. + * Generate POJOs. * * @param value * allowed object is @@ -1180,7 +1194,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the pojosEqualsAndHashCode property. + * Generate basic equals() and hashCode() methods in POJOs. * * @param value * allowed object is @@ -1204,7 +1218,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the pojosToString property. + * Generate basic toString() methods in POJOs. * * @param value * allowed object is @@ -1228,7 +1242,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the pojosAsJavaRecordClasses property. + * Generate POJOs as records, when using the JavaGenerator. * * @param value * allowed object is @@ -1252,7 +1266,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the pojosAsScalaCaseClasses property. + * Generate POJOs as case classes, when using the ScalaGenerator. * * @param value * allowed object is @@ -1276,7 +1290,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the pojosAsKotlinDataClasses property. + * Generate POJOs as data classes, when using the KotlinGenerator. * * @param value * allowed object is @@ -1300,7 +1314,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the immutablePojos property. + * Generate immutable POJOs. * * @param value * allowed object is @@ -1324,7 +1338,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the serializablePojos property. + * Generate serializable POJOs. * * @param value * allowed object is @@ -1348,7 +1362,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the interfaces property. + * Generated interfaces to be implemented by records and/or POJOs. * * @param value * allowed object is @@ -1372,7 +1386,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the immutableInterfaces property. + * Generate immutable interfaces. * * @param value * allowed object is @@ -1396,7 +1410,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the serializableInterfaces property. + * Generate serializable interfaces. * * @param value * allowed object is @@ -1420,7 +1434,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the daos property. + * Generate DAOs. * * @param value * allowed object is @@ -1444,7 +1458,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the jooqVersionReference property. + * Generate references to the most up to date minor release in {@link org.jooq.Constants} to produce compilation errors if an outdated runtime library is being used. * * @param value * allowed object is @@ -1468,7 +1482,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the jpaAnnotations property. + * Annotate POJOs and Records with JPA annotations. * * @param value * allowed object is @@ -1508,7 +1522,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the validationAnnotations property. + * Annotate POJOs and Records with JSR-303 validation annotations * * @param value * allowed object is @@ -1532,7 +1546,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the springAnnotations property. + * Annotate DAOs with useful spring annotations such as @Repository or @Autowired. * * @param value * allowed object is @@ -1556,7 +1570,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the springDao property. + * Generate an AbstractSpringDAOImpl as a base class for other DAO classes, containing @Transactional annotations, etc. * * @param value * allowed object is @@ -1580,7 +1594,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the kotlinSetterJvmNameAnnotationsOnIsPrefix property. + * Workaround for Kotlin generating setX() setters instead of setIsX() in byte code for mutable properties called isX. * * @param value * allowed object is @@ -1604,7 +1618,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the kotlinNotNullPojoAttributes property. + * Generate non-nullable types on POJO attributes, where column is not null. * * @param value * allowed object is @@ -1628,7 +1642,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the kotlinNotNullRecordAttributes property. + * Generate non-nullable types on Record attributes, where column is not null. * * @param value * allowed object is @@ -1652,7 +1666,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the kotlinNotNullInterfaceAttributes property. + * Generate non-nullable types on interface attributes, where column is not null. * * @param value * allowed object is @@ -1676,7 +1690,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the kotlinDefaultedNullablePojoAttributes property. + * Generate defaulted nullable POJO attributes. * * @param value * allowed object is @@ -1700,7 +1714,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the kotlinDefaultedNullableRecordAttributes property. + * Generate defaulted nullable Record attributes. * * @param value * allowed object is @@ -1724,7 +1738,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalObjectNames property. + * Turn on generation of all global object names. * * @param value * allowed object is @@ -1748,7 +1762,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalObjectReferences property. + * Turn off generation of all global object references. * * @param value * allowed object is @@ -1772,7 +1786,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalCatalogReferences property. + * Turn off generation of global catalog references. * * @param value * allowed object is @@ -1796,7 +1810,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalSchemaReferences property. + * Turn off generation of global schema references. * * @param value * allowed object is @@ -1820,7 +1834,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalDomainReferences property. + * Turn off generation of global domain references. * * @param value * allowed object is @@ -1844,7 +1858,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalTriggerReferences property. + * Turn off generation of global trigger references. * * @param value * allowed object is @@ -1868,7 +1882,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalTableReferences property. + * Turn off generation of global table references. * * @param value * allowed object is @@ -1892,7 +1906,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalSequenceReferences property. + * Turn off generation of global sequence references. * * @param value * allowed object is @@ -1916,7 +1930,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalUDTReferences property. + * Turn off generation of global UDT references. * * @param value * allowed object is @@ -1940,7 +1954,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalRoutineReferences property. + * Turn off generation of global routine references. * * @param value * allowed object is @@ -1964,7 +1978,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalQueueReferences property. + * Turn off generation of global queue references. * * @param value * allowed object is @@ -1988,7 +2002,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalLinkReferences property. + * Turn off generation of global database link references. * * @param value * allowed object is @@ -2012,7 +2026,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalKeyReferences property. + * Turn off generation of global key references. * * @param value * allowed object is @@ -2036,7 +2050,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the globalIndexReferences property. + * Turn off generation of global index references. * * @param value * allowed object is @@ -2060,7 +2074,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the defaultCatalog property. + * Turn off generation of a DefaultCatalog object, which is generated by default in the absence of catalogs. * * @param value * allowed object is @@ -2084,7 +2098,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the defaultSchema property. + * Turn off generation of a DefaultSchema object, which is generated by default in the absence of schemas. * * @param value * allowed object is @@ -2108,7 +2122,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the javadoc property. + * Turn off generation of Javadoc on all objects. * * @param value * allowed object is @@ -2132,7 +2146,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the comments property. + * Turn off generation of all SQL comments as Javadoc on all objects. * * @param value * allowed object is @@ -2156,7 +2170,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnCatalogs property. + * Turn off generation of all SQL comments as Javadoc on all catalogs. * * @param value * allowed object is @@ -2180,7 +2194,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnSchemas property. + * Turn off generation of all SQL comments as Javadoc on all schemas. * * @param value * allowed object is @@ -2204,7 +2218,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnTables property. + * Turn off generation of all SQL comments as Javadoc on all tables. * * @param value * allowed object is @@ -2228,7 +2242,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnColumns property. + * Turn off generation of all SQL comments as Javadoc on all columns. * * @param value * allowed object is @@ -2252,7 +2266,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnEmbeddables property. + * Turn off generation of all SQL comments as Javadoc on all embeddables. * * @param value * allowed object is @@ -2276,7 +2290,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnUDTs property. + * Turn off generation of all SQL comments as Javadoc on all UDTs. * * @param value * allowed object is @@ -2300,7 +2314,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnAttributes property. + * Turn off generation of all SQL comments as Javadoc on all attributes. * * @param value * allowed object is @@ -2324,7 +2338,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnPackages property. + * Turn off generation of all SQL comments as Javadoc on all packages. * * @param value * allowed object is @@ -2348,7 +2362,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnRoutines property. + * Turn off generation of all SQL comments as Javadoc on all routines. * * @param value * allowed object is @@ -2372,7 +2386,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnParameters property. + * Turn off generation of all SQL comments as Javadoc on all parameters. * * @param value * allowed object is @@ -2396,7 +2410,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnSequences property. + * Turn off generation of all SQL comments as Javadoc on all sequences. * * @param value * allowed object is @@ -2420,7 +2434,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnLinks property. + * Turn off generation of all SQL comments as Javadoc on all links. * * @param value * allowed object is @@ -2444,7 +2458,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnQueues property. + * Turn off generation of all SQL comments as Javadoc on all queues. * * @param value * allowed object is @@ -2468,7 +2482,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the commentsOnKeys property. + * Turn off generation of all SQL comments as Javadoc on all keys. * * @param value * allowed object is @@ -2492,7 +2506,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the sources property. + * Turn off generation of all source code on all object types. * * @param value * allowed object is @@ -2516,7 +2530,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the sourcesOnViews property. + * Turn off generation of all source code on all views. * * @param value * allowed object is @@ -2540,7 +2554,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the fluentSetters property. + * Generate fluent setters in records, POJOs, interfaces. * * @param value * allowed object is @@ -2581,7 +2595,24 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the javaBeansGettersAndSetters property. + * Modify DefaultGeneratorStrategy behaviour to generate getters and setters in JavaBeans style in records, POJOs, interfaces. + *

+ * If this flag is set to false, then: + *

+ *

+ *

+ * If this flag is set to true, then: + *

+ *

+ * Custom GeneratorStrategy implementations are unaffected * * @param value * allowed object is @@ -2607,7 +2638,9 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the varargSetters property. + * Generate varargs setters for array types for convenience. + *

+ * This may lead to compilation warnings in current Java versions. * * @param value * allowed object is @@ -2687,7 +2720,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the emptyCatalogs property. + * Whether empty catalogs (e.g. empty because of configurations) should still be generated. * * @param value * allowed object is @@ -2711,7 +2744,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the emptySchemas property. + * Whether empty schemas (e.g. empty because of configurations) should still be generated. * * @param value * allowed object is @@ -2738,7 +2771,10 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the javaTimeTypes property. + * A flag indicating whether Java 8's java.time types should be used by the + * source code generator, rather than JDBC's java.sql types. + *

+ * This flag is ignored in the commercial Java 6 distribution of jOOQ 3.9+ * * @param value * allowed object is @@ -2762,7 +2798,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the spatialTypes property. + * A flag indicating whether the spatial type support should be enabled. * * @param value * allowed object is @@ -2786,7 +2822,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the xmlTypes property. + * A flag indicating whether the XML type support should be enabled. * * @param value * allowed object is @@ -2810,7 +2846,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the jsonTypes property. + * A flag indicating whether the JSON type support should be enabled. * * @param value * allowed object is @@ -2834,7 +2870,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the intervalTypes property. + * A flag indicating whether the INTERVAL type support should be enabled. * * @param value * allowed object is @@ -2922,7 +2958,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the whereMethodOverrides property. + * Whether to generate overrides for {@link org.jooq.Table#where(org.jooq.Condition)} and related overloads. * * @param value * allowed object is @@ -2946,7 +2982,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the renameMethodOverrides property. + * Whether to generate overrides (see https://github.com/jOOQ/jOOQ/issues/13937) for {@link org.jooq.Table#rename(org.jooq.Name)} and related overloads. * * @param value * allowed object is @@ -2970,7 +3006,7 @@ public class Generate implements Serializable, XMLAppendable } /** - * Sets the value of the asMethodOverrides property. + * Whether to generate overrides for {@link org.jooq.Table#as(org.jooq.Name)} and related overloads. * * @param value * allowed object is @@ -2981,66 +3017,131 @@ public class Generate implements Serializable, XMLAppendable this.asMethodOverrides = value; } + /** + * Generate index information. + * + */ public Generate withIndexes(Boolean value) { setIndexes(value); return this; } + /** + * Primary key / foreign key relations should be generated and used. + * This is a prerequisite for various advanced features + * + */ public Generate withRelations(Boolean value) { setRelations(value); return this; } + /** + * Sequence flags should be generated and used. + * + */ public Generate withSequenceFlags(Boolean value) { setSequenceFlags(value); return this; } + /** + * Generate UDT path expressions on tables and on UDTs. + * + */ public Generate withUdtPaths(Boolean value) { setUdtPaths(value); return this; } + /** + * Generate implicit join path constructors on generated tables for outgoing foreign key relationships (to-one relationships) + * + */ public Generate withImplicitJoinPathsToOne(Boolean value) { setImplicitJoinPathsToOne(value); return this; } + /** + * Generate implicit join path constructors on generated tables for incoming foreign key relationships (to-many relationships) + * + */ public Generate withImplicitJoinPathsToMany(Boolean value) { setImplicitJoinPathsToMany(value); return this; } + /** + * Generate implicit join path table subtypes implementing {@link org.jooq.Path} for increased JOIN convenience. + * + */ public Generate withImplicitJoinPathTableSubtypes(Boolean value) { setImplicitJoinPathTableSubtypes(value); return this; } + /** + * Generate implicit join path constructors also if there isn't any outgoing or incoming foreign key relationship. + * + */ public Generate withImplicitJoinPathUnusedConstructors(Boolean value) { setImplicitJoinPathUnusedConstructors(value); return this; } + /** + * Whether names of unambiguous {@link org.jooq.meta.ForeignKeyDefinition} should be based + * on the referenced {@link org.jooq.meta.TableDefinition}. + *

+ * When a child table has only one {@link org.jooq.meta.ForeignKeyDefinition} towards a + * parent table, then that path is "unambiguous." In that case, some + * {@link GeneratorStrategy} implementations may choose to use the parent + * table's {@link org.jooq.meta.TableDefinition} for implementations of + * {@link org.jooq.codegen.GeneratorStrategy#getJavaMethodName(Definition)}, instead of the + * {@link org.jooq.meta.ForeignKeyDefinition}, e.g. for implicit join paths. + *

+ * This flag allows for turning off this default behaviour. + * + */ public Generate withImplicitJoinPathsUseTableNameForUnambiguousFKs(Boolean value) { setImplicitJoinPathsUseTableNameForUnambiguousFKs(value); return this; } + /** + * Whether implicit join path constructors should be offered as properties in Kotlin. + * + */ public Generate withImplicitJoinPathsAsKotlinProperties(Boolean value) { setImplicitJoinPathsAsKotlinProperties(value); return this; } + /** + * Generate deprecated code for backwards compatibility + * + */ public Generate withDeprecated(Boolean value) { setDeprecated(value); return this; } + /** + * Generate deprecation annotations on references to unknown data types. + * This helps to identify columns, attributes, and parameters, which may not be usable through + * jOOQ API, without adding custom data type bindings to them. + * + */ public Generate withDeprecationOnUnknownTypes(Boolean value) { setDeprecationOnUnknownTypes(value); return this; } + /** + * @deprecated + * + */ public Generate withInstanceFields(Boolean value) { setInstanceFields(value); return this; @@ -3055,6 +3156,11 @@ public class Generate implements Serializable, XMLAppendable return this; } + /** + * Generate the {@link javax.annotation.processing.Generated} annotation to indicate + * jOOQ version used for source code. + * + */ public Generate withGeneratedAnnotation(Boolean value) { setGeneratedAnnotation(value); return this; @@ -3070,16 +3176,28 @@ public class Generate implements Serializable, XMLAppendable return this; } + /** + * Whether the {@link javax.annotation.processing.Generated} annotation should include the date attribute. + * + */ public Generate withGeneratedAnnotationDate(Boolean value) { setGeneratedAnnotationDate(value); return this; } + /** + * Whether the {@link javax.annotation.processing.Generated} annotation should include the jOOQ version. + * + */ public Generate withGeneratedAnnotationJooqVersion(Boolean value) { setGeneratedAnnotationJooqVersion(value); return this; } + /** + * Whether non-nullable items should be annotated with the annotation type specified in {@link #nonnullAnnotationType}. In SQL and by consequence in jOOQ, non-nullability cannot be guaranteed statically. There may still be some cases (e.g. after unions, outer joins, etc.) where a normally non-null value turns out to be null! + * + */ public Generate withNonnullAnnotation(Boolean value) { setNonnullAnnotation(value); return this; @@ -3094,6 +3212,10 @@ public class Generate implements Serializable, XMLAppendable return this; } + /** + * Whether nullable items should be annotated with the annotation type specified in {@link #nullableAnnotationType}. Unlike {@link #nonnullAnnotation}, nullability can be guaranteed as in SQL, and by consequence in jOOQ, every column expression can be made nullable using some SQL operation. + * + */ public Generate withNullableAnnotation(Boolean value) { setNullableAnnotation(value); return this; @@ -3108,146 +3230,262 @@ public class Generate implements Serializable, XMLAppendable return this; } + /** + * Generate the {@link java.beans.ConstructorProperties} annotation on generated POJOs and/or records. + * + */ public Generate withConstructorPropertiesAnnotation(Boolean value) { setConstructorPropertiesAnnotation(value); return this; } + /** + * Generate the {@link java.beans.ConstructorProperties} annotation on generated POJOs (defaults to true if {@link #constructorPropertiesAnnotation} is active). + * + */ public Generate withConstructorPropertiesAnnotationOnPojos(Boolean value) { setConstructorPropertiesAnnotationOnPojos(value); return this; } + /** + * Generate the {@link java.beans.ConstructorProperties} annotation on generated records (defaults to true if {@link #constructorPropertiesAnnotation} is active). + * + */ public Generate withConstructorPropertiesAnnotationOnRecords(Boolean value) { setConstructorPropertiesAnnotationOnRecords(value); return this; } + /** + * Generate Routine classes. + * + */ public Generate withRoutines(Boolean value) { setRoutines(value); return this; } + /** + * Generate Sequence classes. + * + */ public Generate withSequences(Boolean value) { setSequences(value); return this; } + /** + * Generate Trigger classes. + * + */ public Generate withTriggers(Boolean value) { setTriggers(value); return this; } + /** + * Generate UDT classes. + * + */ public Generate withUdts(Boolean value) { setUdts(value); return this; } + /** + * Generate Queue classes. + * + */ public Generate withQueues(Boolean value) { setQueues(value); return this; } + /** + * Generate database Link classes. + * + */ public Generate withLinks(Boolean value) { setLinks(value); return this; } + /** + * Generate Key classes. + * + */ public Generate withKeys(Boolean value) { setKeys(value); return this; } + /** + * Generate Table classes. + * + */ public Generate withTables(Boolean value) { setTables(value); return this; } + /** + * Generate embeddable classes. + * + */ public Generate withEmbeddables(Boolean value) { setEmbeddables(value); return this; } + /** + * Generate TableRecord classes. + * + */ public Generate withRecords(Boolean value) { setRecords(value); return this; } + /** + * Generate TableRecord classes that implement Record[N] super types + * + */ public Generate withRecordsImplementingRecordN(Boolean value) { setRecordsImplementingRecordN(value); return this; } + /** + * @deprecated Activate the legacy Scala sealed trait enum emulation + * + */ public Generate withEnumsAsScalaSealedTraits(Boolean value) { setEnumsAsScalaSealedTraits(value); return this; } + /** + * Generate POJOs. + * + */ public Generate withPojos(Boolean value) { setPojos(value); return this; } + /** + * Generate basic equals() and hashCode() methods in POJOs. + * + */ public Generate withPojosEqualsAndHashCode(Boolean value) { setPojosEqualsAndHashCode(value); return this; } + /** + * Generate basic toString() methods in POJOs. + * + */ public Generate withPojosToString(Boolean value) { setPojosToString(value); return this; } + /** + * Generate POJOs as records, when using the JavaGenerator. + * + */ public Generate withPojosAsJavaRecordClasses(Boolean value) { setPojosAsJavaRecordClasses(value); return this; } + /** + * Generate POJOs as case classes, when using the ScalaGenerator. + * + */ public Generate withPojosAsScalaCaseClasses(Boolean value) { setPojosAsScalaCaseClasses(value); return this; } + /** + * Generate POJOs as data classes, when using the KotlinGenerator. + * + */ public Generate withPojosAsKotlinDataClasses(Boolean value) { setPojosAsKotlinDataClasses(value); return this; } + /** + * Generate immutable POJOs. + * + */ public Generate withImmutablePojos(Boolean value) { setImmutablePojos(value); return this; } + /** + * Generate serializable POJOs. + * + */ public Generate withSerializablePojos(Boolean value) { setSerializablePojos(value); return this; } + /** + * Generated interfaces to be implemented by records and/or POJOs. + * + */ public Generate withInterfaces(Boolean value) { setInterfaces(value); return this; } + /** + * Generate immutable interfaces. + * + */ public Generate withImmutableInterfaces(Boolean value) { setImmutableInterfaces(value); return this; } + /** + * Generate serializable interfaces. + * + */ public Generate withSerializableInterfaces(Boolean value) { setSerializableInterfaces(value); return this; } + /** + * Generate DAOs. + * + */ public Generate withDaos(Boolean value) { setDaos(value); return this; } + /** + * Generate references to the most up to date minor release in {@link org.jooq.Constants} to produce compilation errors if an outdated runtime library is being used. + * + */ public Generate withJooqVersionReference(Boolean value) { setJooqVersionReference(value); return this; } + /** + * Annotate POJOs and Records with JPA annotations. + * + */ public Generate withJpaAnnotations(Boolean value) { setJpaAnnotations(value); return this; @@ -3262,231 +3500,434 @@ public class Generate implements Serializable, XMLAppendable return this; } + /** + * Annotate POJOs and Records with JSR-303 validation annotations + * + */ public Generate withValidationAnnotations(Boolean value) { setValidationAnnotations(value); return this; } + /** + * Annotate DAOs with useful spring annotations such as @Repository or @Autowired. + * + */ public Generate withSpringAnnotations(Boolean value) { setSpringAnnotations(value); return this; } + /** + * Generate an AbstractSpringDAOImpl as a base class for other DAO classes, containing @Transactional annotations, etc. + * + */ public Generate withSpringDao(Boolean value) { setSpringDao(value); return this; } + /** + * Workaround for Kotlin generating setX() setters instead of setIsX() in byte code for mutable properties called isX. + * + */ public Generate withKotlinSetterJvmNameAnnotationsOnIsPrefix(Boolean value) { setKotlinSetterJvmNameAnnotationsOnIsPrefix(value); return this; } + /** + * Generate non-nullable types on POJO attributes, where column is not null. + * + */ public Generate withKotlinNotNullPojoAttributes(Boolean value) { setKotlinNotNullPojoAttributes(value); return this; } + /** + * Generate non-nullable types on Record attributes, where column is not null. + * + */ public Generate withKotlinNotNullRecordAttributes(Boolean value) { setKotlinNotNullRecordAttributes(value); return this; } + /** + * Generate non-nullable types on interface attributes, where column is not null. + * + */ public Generate withKotlinNotNullInterfaceAttributes(Boolean value) { setKotlinNotNullInterfaceAttributes(value); return this; } + /** + * Generate defaulted nullable POJO attributes. + * + */ public Generate withKotlinDefaultedNullablePojoAttributes(Boolean value) { setKotlinDefaultedNullablePojoAttributes(value); return this; } + /** + * Generate defaulted nullable Record attributes. + * + */ public Generate withKotlinDefaultedNullableRecordAttributes(Boolean value) { setKotlinDefaultedNullableRecordAttributes(value); return this; } + /** + * Turn on generation of all global object names. + * + */ public Generate withGlobalObjectNames(Boolean value) { setGlobalObjectNames(value); return this; } + /** + * Turn off generation of all global object references. + * + */ public Generate withGlobalObjectReferences(Boolean value) { setGlobalObjectReferences(value); return this; } + /** + * Turn off generation of global catalog references. + * + */ public Generate withGlobalCatalogReferences(Boolean value) { setGlobalCatalogReferences(value); return this; } + /** + * Turn off generation of global schema references. + * + */ public Generate withGlobalSchemaReferences(Boolean value) { setGlobalSchemaReferences(value); return this; } + /** + * Turn off generation of global domain references. + * + */ public Generate withGlobalDomainReferences(Boolean value) { setGlobalDomainReferences(value); return this; } + /** + * Turn off generation of global trigger references. + * + */ public Generate withGlobalTriggerReferences(Boolean value) { setGlobalTriggerReferences(value); return this; } + /** + * Turn off generation of global table references. + * + */ public Generate withGlobalTableReferences(Boolean value) { setGlobalTableReferences(value); return this; } + /** + * Turn off generation of global sequence references. + * + */ public Generate withGlobalSequenceReferences(Boolean value) { setGlobalSequenceReferences(value); return this; } + /** + * Turn off generation of global UDT references. + * + */ public Generate withGlobalUDTReferences(Boolean value) { setGlobalUDTReferences(value); return this; } + /** + * Turn off generation of global routine references. + * + */ public Generate withGlobalRoutineReferences(Boolean value) { setGlobalRoutineReferences(value); return this; } + /** + * Turn off generation of global queue references. + * + */ public Generate withGlobalQueueReferences(Boolean value) { setGlobalQueueReferences(value); return this; } + /** + * Turn off generation of global database link references. + * + */ public Generate withGlobalLinkReferences(Boolean value) { setGlobalLinkReferences(value); return this; } + /** + * Turn off generation of global key references. + * + */ public Generate withGlobalKeyReferences(Boolean value) { setGlobalKeyReferences(value); return this; } + /** + * Turn off generation of global index references. + * + */ public Generate withGlobalIndexReferences(Boolean value) { setGlobalIndexReferences(value); return this; } + /** + * Turn off generation of a DefaultCatalog object, which is generated by default in the absence of catalogs. + * + */ public Generate withDefaultCatalog(Boolean value) { setDefaultCatalog(value); return this; } + /** + * Turn off generation of a DefaultSchema object, which is generated by default in the absence of schemas. + * + */ public Generate withDefaultSchema(Boolean value) { setDefaultSchema(value); return this; } + /** + * Turn off generation of Javadoc on all objects. + * + */ public Generate withJavadoc(Boolean value) { setJavadoc(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all objects. + * + */ public Generate withComments(Boolean value) { setComments(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all catalogs. + * + */ public Generate withCommentsOnCatalogs(Boolean value) { setCommentsOnCatalogs(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all schemas. + * + */ public Generate withCommentsOnSchemas(Boolean value) { setCommentsOnSchemas(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all tables. + * + */ public Generate withCommentsOnTables(Boolean value) { setCommentsOnTables(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all columns. + * + */ public Generate withCommentsOnColumns(Boolean value) { setCommentsOnColumns(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all embeddables. + * + */ public Generate withCommentsOnEmbeddables(Boolean value) { setCommentsOnEmbeddables(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all UDTs. + * + */ public Generate withCommentsOnUDTs(Boolean value) { setCommentsOnUDTs(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all attributes. + * + */ public Generate withCommentsOnAttributes(Boolean value) { setCommentsOnAttributes(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all packages. + * + */ public Generate withCommentsOnPackages(Boolean value) { setCommentsOnPackages(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all routines. + * + */ public Generate withCommentsOnRoutines(Boolean value) { setCommentsOnRoutines(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all parameters. + * + */ public Generate withCommentsOnParameters(Boolean value) { setCommentsOnParameters(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all sequences. + * + */ public Generate withCommentsOnSequences(Boolean value) { setCommentsOnSequences(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all links. + * + */ public Generate withCommentsOnLinks(Boolean value) { setCommentsOnLinks(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all queues. + * + */ public Generate withCommentsOnQueues(Boolean value) { setCommentsOnQueues(value); return this; } + /** + * Turn off generation of all SQL comments as Javadoc on all keys. + * + */ public Generate withCommentsOnKeys(Boolean value) { setCommentsOnKeys(value); return this; } + /** + * Turn off generation of all source code on all object types. + * + */ public Generate withSources(Boolean value) { setSources(value); return this; } + /** + * Turn off generation of all source code on all views. + * + */ public Generate withSourcesOnViews(Boolean value) { setSourcesOnViews(value); return this; } + /** + * Generate fluent setters in records, POJOs, interfaces. + * + */ public Generate withFluentSetters(Boolean value) { setFluentSetters(value); return this; } + /** + * Modify DefaultGeneratorStrategy behaviour to generate getters and setters in JavaBeans style in records, POJOs, interfaces. + *

+ * If this flag is set to false, then: + *

+ *

+ *

+ * If this flag is set to true, then: + *

+ *

+ * Custom GeneratorStrategy implementations are unaffected + * + */ public Generate withJavaBeansGettersAndSetters(Boolean value) { setJavaBeansGettersAndSetters(value); return this; } + /** + * Generate varargs setters for array types for convenience. + *

+ * This may lead to compilation warnings in current Java versions. + * + */ public Generate withVarargSetters(Boolean value) { setVarargSetters(value); return this; @@ -3523,36 +3964,67 @@ public class Generate implements Serializable, XMLAppendable return this; } + /** + * Whether empty catalogs (e.g. empty because of configurations) should still be generated. + * + */ public Generate withEmptyCatalogs(Boolean value) { setEmptyCatalogs(value); return this; } + /** + * Whether empty schemas (e.g. empty because of configurations) should still be generated. + * + */ public Generate withEmptySchemas(Boolean value) { setEmptySchemas(value); return this; } + /** + * A flag indicating whether Java 8's java.time types should be used by the + * source code generator, rather than JDBC's java.sql types. + *

+ * This flag is ignored in the commercial Java 6 distribution of jOOQ 3.9+ + * + */ public Generate withJavaTimeTypes(Boolean value) { setJavaTimeTypes(value); return this; } + /** + * A flag indicating whether the spatial type support should be enabled. + * + */ public Generate withSpatialTypes(Boolean value) { setSpatialTypes(value); return this; } + /** + * A flag indicating whether the XML type support should be enabled. + * + */ public Generate withXmlTypes(Boolean value) { setXmlTypes(value); return this; } + /** + * A flag indicating whether the JSON type support should be enabled. + * + */ public Generate withJsonTypes(Boolean value) { setJsonTypes(value); return this; } + /** + * A flag indicating whether the INTERVAL type support should be enabled. + * + */ public Generate withIntervalTypes(Boolean value) { setIntervalTypes(value); return this; @@ -3594,16 +4066,28 @@ public class Generate implements Serializable, XMLAppendable return this; } + /** + * Whether to generate overrides for {@link org.jooq.Table#where(org.jooq.Condition)} and related overloads. + * + */ public Generate withWhereMethodOverrides(Boolean value) { setWhereMethodOverrides(value); return this; } + /** + * Whether to generate overrides (see https://github.com/jOOQ/jOOQ/issues/13937) for {@link org.jooq.Table#rename(org.jooq.Name)} and related overloads. + * + */ public Generate withRenameMethodOverrides(Boolean value) { setRenameMethodOverrides(value); return this; } + /** + * Whether to generate overrides for {@link org.jooq.Table#as(org.jooq.Name)} and related overloads. + * + */ public Generate withAsMethodOverrides(Boolean value) { setAsMethodOverrides(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java index e142075860..9ec442f106 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Jdbc.java @@ -166,7 +166,7 @@ public class Jdbc implements Serializable, XMLAppendable } /** - * Sets the value of the autoCommit property. + * The value of the JDBC autocommit flag. The flag is not set by default, i.e. it keeps the default provided to jOOQ. * * @param value * allowed object is @@ -275,6 +275,10 @@ public class Jdbc implements Serializable, XMLAppendable return this; } + /** + * The value of the JDBC autocommit flag. The flag is not set by default, i.e. it keeps the default provided to jOOQ. + * + */ public Jdbc withAutoCommit(Boolean value) { setAutoCommit(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/LambdaConverter.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/LambdaConverter.java index 6d21a4bb0c..de48248721 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/LambdaConverter.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/LambdaConverter.java @@ -83,7 +83,7 @@ public class LambdaConverter implements Serializable, XMLAppendable } /** - * Sets the value of the nullable property. + * Whether to use {@link org.jooq.Converter#ofNullable(Class, Class, java.util.function.Function, java.util.function.Function)} or {@link org.jooq.Converter#of(Class, Class, java.util.function.Function, java.util.function.Function)}. * * @param value * allowed object is @@ -112,6 +112,10 @@ public class LambdaConverter implements Serializable, XMLAppendable return this; } + /** + * Whether to use {@link org.jooq.Converter#ofNullable(Class, Class, java.util.function.Function, java.util.function.Function)} or {@link org.jooq.Converter#of(Class, Class, java.util.function.Function, java.util.function.Function)}. + * + */ public LambdaConverter withNullable(Boolean value) { setNullable(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SchemaMappingType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SchemaMappingType.java index 5935b816d3..b5dd592df0 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SchemaMappingType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SchemaMappingType.java @@ -82,7 +82,7 @@ public class SchemaMappingType implements Serializable, XMLAppendable } /** - * Sets the value of the outputSchemaToDefault property. + * See also {@link Database#isOutputSchemaToDefault()} * * @param value * allowed object is @@ -111,6 +111,10 @@ public class SchemaMappingType implements Serializable, XMLAppendable return this; } + /** + * See also {@link Database#isOutputSchemaToDefault()} + * + */ public SchemaMappingType withOutputSchemaToDefault(Boolean value) { setOutputSchemaToDefault(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticEnumType.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticEnumType.java index 4bff21690a..221cdd7dc1 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticEnumType.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/SyntheticEnumType.java @@ -146,7 +146,7 @@ public class SyntheticEnumType implements Serializable, XMLAppendable } /** - * Sets the value of the literalsFromColumnContent property. + * The matched column's content defines the literals (this is convenience for {@link #literalSql} being SELECT DISTINCT matched_column FROM matched_table). * * @param value * allowed object is @@ -170,7 +170,7 @@ public class SyntheticEnumType implements Serializable, XMLAppendable } /** - * Sets the value of the literalsFromCheckConstraints property. + * The list of literals is parsed from the applicable CHECK constraints for the matched column, if possible. * * @param value * allowed object is @@ -244,11 +244,19 @@ public class SyntheticEnumType implements Serializable, XMLAppendable return this; } + /** + * The matched column's content defines the literals (this is convenience for {@link #literalSql} being SELECT DISTINCT matched_column FROM matched_table). + * + */ public SyntheticEnumType withLiteralsFromColumnContent(Boolean value) { setLiteralsFromColumnContent(value); return this; } + /** + * The list of literals is parsed from the applicable CHECK constraints for the matched column, if possible. + * + */ public SyntheticEnumType withLiteralsFromCheckConstraints(Boolean value) { setLiteralsFromCheckConstraints(value); return this; diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Target.java b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Target.java index 4feee4e844..7f17b27efb 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Target.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/jaxb/Target.java @@ -126,7 +126,7 @@ public class Target implements Serializable, XMLAppendable } /** - * Sets the value of the clean property. + * Whether the target package should be cleaned to contain only generated code after a generation run. * * @param value * allowed object is @@ -176,6 +176,10 @@ public class Target implements Serializable, XMLAppendable return this; } + /** + * Whether the target package should be cleaned to contain only generated code after a generation run. + * + */ public Target withClean(Boolean value) { setClean(value); return this; diff --git a/jOOQ/src/main/java/org/jooq/conf/Settings.java b/jOOQ/src/main/java/org/jooq/conf/Settings.java index ce751e182f..115ff14eda 100644 --- a/jOOQ/src/main/java/org/jooq/conf/Settings.java +++ b/jOOQ/src/main/java/org/jooq/conf/Settings.java @@ -559,7 +559,7 @@ public class Settings } /** - * Sets the value of the forceIntegerTypesOnZeroScaleDecimals property. + * Historically, zero-scale decimal types are generated as their most appropriate, corresponding integer type (e.g. NUMBER(2, 0) and less: Byte). The same behaviour is replicated in the {@link org.jooq.Meta} API. This flag allows for turning off this feature. * * @param value * allowed object is @@ -586,7 +586,10 @@ public class Settings } /** - * Sets the value of the renderCatalog property. + * Whether any catalog name should be rendered at all. + *

+ * Use this for single-catalog environments, or when all objects are made + * available using synonyms * * @param value * allowed object is @@ -615,7 +618,12 @@ public class Settings } /** - * Sets the value of the renderSchema property. + * Whether any schema name should be rendered at all. + *

+ * Setting this to false also implicitly sets "renderCatalog" to false. + *

+ * Use this for single-schema environments, or when all objects are made + * available using synonyms * * @param value * allowed object is @@ -859,7 +867,7 @@ public class Settings } /** - * Sets the value of the renderFormatted property. + * Whether rendered SQL should be pretty-printed. * * @param value * allowed object is @@ -998,7 +1006,10 @@ public class Settings } /** - * Sets the value of the renderScalarSubqueriesForStoredFunctions property. + * Whether stored function calls should be wrapped in scalar subqueries. + *

+ * Oracle 11g (and potentially, other databases too) implements scalar subquery caching. With this flag + * set to true, users can automatically profit from this feature in all SQL statements. * * @param value * allowed object is @@ -1093,7 +1104,12 @@ public class Settings } /** - * Sets the value of the renderCoalesceToEmptyStringInConcat property. + * Whether stored function calls should be wrapped in scalar subqueries. + *

+ * Oracle 11g (and potentially, other databases too) implements scalar subquery caching. With this flag + * set to true, users can automatically profit from this feature in all SQL statements. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1127,7 +1143,17 @@ public class Settings } /** - * Sets the value of the renderOrderByRownumberForEmulatedPagination property. + * Whether an additional ORDER BY rn clause should be rendered on emulated paginated queries. + *

+ * Older databases did not support OFFSET .. FETCH pagination, so jOOQ emulates it using derived + * tables and ROWNUM (Oracle 11g and older) or ROW_NUMBER() (e.g. DB2, + * SQL Server, etc.) filtering. While these subqueries are ordered, the ordering is not + * guaranteed to be stable in the outer most queries. It may be stable (and e.g. in Oracle, + * it mostly is, if queries are not parallel, or joined to other queries, etc.), so the excess + * ORDER BY clause may add some additional performance overhead. This setting forces + * jOOQ to not generate the additional ORDER BY clause. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/7609. * * @param value * allowed object is @@ -1163,7 +1189,19 @@ public class Settings } /** - * Sets the value of the renderOutputForSQLServerReturningClause property. + * Whether the jOOQ RETURNING clause should map to SQL Server's OUTPUT clause. + *

+ * SQL Server supports an OUTPUT clause in most DML statements, whose behaviour + * is almost identical to RETURNING in Firebird, Oracle, PostgreSQL. Users who + * want to prevent jOOQ from rendering this OUTPUT clause can deactivate this flag + * to revert to jOOQ calling {@code java.sql.Statement#getGeneratedKeys()} instead, which + * is only supported for single row inserts. + *

+ * This OUTPUT clause does not support fetching trigger generated values. In order + * to fetch trigger generated values, {@link #fetchTriggerValuesAfterReturning} needs to + * be enabled as well. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/4498. * * @param value * allowed object is @@ -1194,7 +1232,14 @@ public class Settings } /** - * Sets the value of the renderGroupConcatMaxLenSessionVariable property. + * Whether the jOOQ GROUP_CONCAT function should be overflow-protected by setting the @@group_concat_max_len session variable in MySQL style database systems. + *

+ * MySQL truncates GROUP_CONCAT results after a certain length, which may be way + * too small for jOOQ's usage, especially when using the MULTISET emulation. By + * default, jOOQ sets a session variable to the highest possible value prior to executing a + * query containing GROUP_CONCAT. This flag can be used to opt out of this. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/12092. * * @param value * allowed object is @@ -1225,7 +1270,14 @@ public class Settings } /** - * Sets the value of the renderParenthesisAroundSetOperationQueries property. + * Whether queries combined with set operators (e.g. UNION and UNION ALL) should always be surrounded by a parenthesis pair. + *

+ * By default (i.e. when this setting is set to false jOOQ will only render parenthesis pairs around queries combined with set operators when required. + * This is for example the case when set operators are nested, when non-associative operators like EXCEPT are used, or when the queries are rendered as derived tables. + *

+ * When this setting is set to true the queries combined with set operators will always be surrounded by a parenthesis pair. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/3676 and https://github.com/jOOQ/jOOQ/issues/9751. * * @param value * allowed object is @@ -1251,7 +1303,9 @@ public class Settings } /** - * Sets the value of the renderVariablesInDerivedTablesForEmulations property. + * Whether emulations that require repeating expressions should render variables for those expressions in derived tables. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/14065. * * @param value * allowed object is @@ -1279,7 +1333,11 @@ public class Settings } /** - * Sets the value of the renderRowConditionForSeekClause property. + * Whether a (a, b) < (:a, :b) row predicate should be rendered for the SEEK clause. + *

+ * Some RDBMS may support (a, b) < (:a, :b) row predicate syntax, which is very convenient for SEEK clause implementations, but fail to optimise this predicate as could be expected. + * This flag allows for expanding the predicate to the much more verbose, but equivalent (a < :a) OR (a = :a AND b < :b). Dialects without native support for row predicates aren't affected + * by this flag. * * @param value * allowed object is @@ -1306,7 +1364,10 @@ public class Settings } /** - * Sets the value of the renderRedundantConditionForSeekClause property. + * Whether a redundant (a <= :a) predicate should be rendered for a (a, b) < (:a, :b) predicate for the SEEK clause. + *

+ * Some RDBMS may not be able to properly optimise (a, b) < ('a', 'b') or (a < 'a') OR (a = 'a' AND b < 'b'), and choose an appropriate index. By adding an additional redundant predicate, + * jOOQ may help the optimiser, e.g. (a <= :a) AND (a, b) < ('a', 'b') or (a <= :a) AND ((a < 'a') OR (a = 'a' AND b < 'b')) * * @param value * allowed object is @@ -1330,7 +1391,7 @@ public class Settings } /** - * Sets the value of the renderPlainSQLTemplatesAsRaw property. + * Whether plain SQL templates ({@link org.jooq.SQL}) are rendered as raw string content. * * @param value * allowed object is @@ -1414,7 +1475,13 @@ public class Settings } /** - * Sets the value of the bindOffsetDateTimeType property. + * Whether the java.time (JSR 310) type {@link java.time.OffsetDateTime} should be bound natively to JDBC. + *

+ * Historically, jOOQ encoded the java.time types as strings to offer better compatibility with older JDBC drivers. By now, most drivers should support the java.time types. Using them may produce better performance both on the server and on the client side. + *

+ * This flag allows for reverting to pre-jOOQ 3.14 behaviour, where the default is to bind these types natively. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/9902. * * @param value * allowed object is @@ -1444,7 +1511,13 @@ public class Settings } /** - * Sets the value of the bindOffsetTimeType property. + * Whether the java.time (JSR 310) type {@link java.time.OffsetTime} should be bound natively to JDBC. + *

+ * Historically, jOOQ encoded the java.time types as strings to offer better compatibility with older JDBC drivers. By now, most drivers should support the java.time types. Using them may produce better performance both on the server and on the client side. + *

+ * This flag allows for reverting to pre-jOOQ 3.14 behaviour, where the default is to bind these types natively. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/9902. * * @param value * allowed object is @@ -1478,7 +1551,16 @@ public class Settings } /** - * Sets the value of the fetchTriggerValuesAfterSQLServerOutput property. + * Fetch trigger values after SQL Server OUTPUT clause. + *

+ * SQL Server OUTPUT statements do not support fetching trigger generated values. + * This is a limitation of the {@link #renderOutputForSQLServerReturningClause}. An additional + * MERGE statement can run a second query if (and only if) the primary key has been + * included in the OUTPUT clause. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/4498. + *

+ * @deprecated - 3.18.0 - [#13912] [#15316] - Use {@link #fetchTriggerValuesAfterReturning} instead. * * @param value * allowed object is @@ -1576,7 +1658,10 @@ public class Settings } /** - * Sets the value of the diagnosticsDuplicateStatements property. + * Whether to run the {@link org.jooq.DiagnosticsListener#duplicateStatements(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. * * @param value * allowed object is @@ -1609,7 +1694,16 @@ public class Settings } /** - * Sets the value of the diagnosticsDuplicateStatementsUsingTransformPatterns property. + * Whether to run the {@link org.jooq.DiagnosticsListener#duplicateStatements(org.jooq.DiagnosticsContext)} diagnostic with the {@link #transformPatterns} feature activated. + *

+ * When transforming patterns, many more complex, duplicate SQL statements can be recognised than if simply + * parsing and re-rendering the statement. This flag turns on all transformation patterns, independently of their + * individual settings. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1636,7 +1730,10 @@ public class Settings } /** - * Sets the value of the diagnosticsMissingWasNullCall property. + * Whether to run the {@link org.jooq.DiagnosticsListener#missingWasNullCall(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. * * @param value * allowed object is @@ -1663,7 +1760,10 @@ public class Settings } /** - * Sets the value of the diagnosticsRepeatedStatements property. + * Whether to run the {@link org.jooq.DiagnosticsListener#repeatedStatements(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. * * @param value * allowed object is @@ -1692,7 +1792,12 @@ public class Settings } /** - * Sets the value of the diagnosticsConsecutiveAggregation property. + * Whether to run the {@link org.jooq.DiagnosticsListener#consecutiveAggregation(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1721,7 +1826,12 @@ public class Settings } /** - * Sets the value of the diagnosticsConcatenationInPredicate property. + * Whether to run the {@link org.jooq.DiagnosticsListener#concatenationInPredicate(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1750,7 +1860,12 @@ public class Settings } /** - * Sets the value of the diagnosticsPossiblyWrongExpression property. + * Whether to run the {@link org.jooq.DiagnosticsListener#possiblyWrongExpression(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1777,7 +1892,10 @@ public class Settings } /** - * Sets the value of the diagnosticsTooManyColumnsFetched property. + * Whether to run the {@link org.jooq.DiagnosticsListener#tooManyColumnsFetched(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. * * @param value * allowed object is @@ -1804,7 +1922,10 @@ public class Settings } /** - * Sets the value of the diagnosticsTooManyRowsFetched property. + * Whether to run the {@link org.jooq.DiagnosticsListener#tooManyRowsFetched(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. * * @param value * allowed object is @@ -1831,7 +1952,10 @@ public class Settings } /** - * Sets the value of the diagnosticsUnnecessaryWasNullCall property. + * Whether to run the {@link org.jooq.DiagnosticsListener#unnecessaryWasNullCall(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. * * @param value * allowed object is @@ -1864,7 +1988,16 @@ public class Settings } /** - * Sets the value of the diagnosticsPatterns property. + * Whether to run the various pattern transformation diagnostics. + *

+ * {@link #transformPatterns} allows for applying numerous pattern transformations, which can be turned on separately when running + * diagnostics. This flag overrides the {@link #transformPatterns} flag in the diagnostics context. Individual pattern flags + * still allow to enable / disable the pattern for diagnostics. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1893,7 +2026,12 @@ public class Settings } /** - * Sets the value of the diagnosticsTrivialCondition property. + * Whether to run the {@link org.jooq.DiagnosticsListener#trivialCondition(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1922,7 +2060,12 @@ public class Settings } /** - * Sets the value of the diagnosticsNullCondition property. + * Whether to run the {@link org.jooq.DiagnosticsListener#nullConditoin(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1953,7 +2096,14 @@ public class Settings } /** - * Sets the value of the transformPatterns property. + * Transform various syntax patterns to better versions, if possible. + *

+ * This flag enables the pattern transformation feature, which consists of several sub-flags that are + * all prefixed with "transformPatterns", e.g. {@link #transformPatternsTrim}. While the sub-flags default + * to being enabled, and can be disabled on an individual basis, the global feature itself is disabled by + * default. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -1977,7 +2127,7 @@ public class Settings } /** - * Sets the value of the transformPatternsLogging property. + * Activate debug logging of the {@link #transformPatterns} feature. * * @param value * allowed object is @@ -2008,7 +2158,14 @@ public class Settings } /** - * Sets the value of the transformPatternsUnnecessaryDistinct property. + * Transform SELECT DISTINCT a, b FROM t GROUP BY a, b to SELECT a, b FROM t GROUP BY a, b. + *

+ * The GROUP BY clause already removes duplicates, so if the DISTINCT clause + * contains at least all the columns from GROUP BY then it can be removed. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2039,7 +2196,14 @@ public class Settings } /** - * Sets the value of the transformPatternsUnnecessaryScalarSubquery property. + * Transform SELECT (SELECT 1) to SELECT 1. + *

+ * Scalar subqueries that don't have any content other than a SELECT clause are unnecessary + * and can be removed. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2069,7 +2233,13 @@ public class Settings } /** - * Sets the value of the transformPatternsUnnecessaryInnerJoin property. + * Transform SELECT * FROM t INNER JOIN u ON TRUE to SELECT * FROM t CROSS JOIN u. + *

+ * Some INNER JOIN expressions can be proven to be unnecessary. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2099,7 +2269,13 @@ public class Settings } /** - * Sets the value of the transformPatternsUnnecessaryGroupByExpressions property. + * Transform SELECT a, b FROM t GROUP BY a, a, b to SELECT a, b FROM t GROUP BY a, b. + *

+ * Duplicate GROUP BY expressions can be removed. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2129,7 +2305,13 @@ public class Settings } /** - * Sets the value of the transformPatternsUnnecessaryOrderByExpressions property. + * Transform SELECT a, b FROM t ORDER BY a, a, b to SELECT a, b FROM t ORDER BY a, b. + *

+ * Duplicate ORDER BY expressions can be removed. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2166,7 +2348,20 @@ public class Settings } /** - * Sets the value of the transformPatternsUnnecessaryExistsSubqueryClauses property. + * Transform [ NOT ] EXISTS (SELECT DISTINCT a, b FROM t ORDER BY c LIMIT d) to [ NOT ] EXISTS (SELECT 1 FROM t). + *

+ * In EXISTS subqueries, quite a few SELECT clauses are meaningless, and can + * thus be removed. These include: + *

+ *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2197,7 +2392,14 @@ public class Settings } /** - * Sets the value of the transformPatternsCountConstant property. + * Transform COUNT(1) or any other COUNT(const) to COUNT(*). + *

+ * There is no benefit to counting a constant expression. In fact, in some RDBMS, it might even be slightly + * slower, at least in benchmarks. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2229,7 +2431,15 @@ public class Settings } /** - * Sets the value of the transformPatternsTrim property. + * Transform LTRIM(RTRIM(x)) or RTRIM(LTRIM(x)) to TRIM(x). + *

+ * Historically, a few dialects did not implement TRIM(x) or TRIM(BOTH FROM x), + * so users worked around this by wrapping LTRIM() and RTRIM() with each other. + * Maintaining this is usually undesirable, so this transformation helps remove the unwanted wrapping. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2259,7 +2469,13 @@ public class Settings } /** - * Sets the value of the transformPatternsNotAnd property. + * Transform NOT(p AND q) to NOT(p) OR NOT(q). + *

+ * This transformation normalises a predicate using De Morgan's rules. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2289,7 +2505,13 @@ public class Settings } /** - * Sets the value of the transformPatternsNotOr property. + * Transform NOT(p OR q) to NOT(p) AND NOT(q). + *

+ * This transformation normalises a predicate using De Morgan's rules. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2319,7 +2541,13 @@ public class Settings } /** - * Sets the value of the transformPatternsNotNot property. + * Transform NOT(NOT(x)) to x. + *

+ * This transformation removes a redundant logic negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2349,7 +2577,13 @@ public class Settings } /** - * Sets the value of the transformPatternsNotComparison property. + * Transform NOT (a != b) to a = b, and similar comparisons. + *

+ * This transformation removes a redundant logical negation from the DISTINCT predicate. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2379,7 +2613,13 @@ public class Settings } /** - * Sets the value of the transformPatternsNotNotDistinct property. + * Transform NOT (a IS NOT DISTINCT FROM b) to a IS DISTINCT FROM b. + *

+ * This transformation removes a redundant logical negation from the DISTINCT predicate. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2409,7 +2649,13 @@ public class Settings } /** - * Sets the value of the transformPatternsDistinctFromNull property. + * Transform a IS [ NOT ] DISTINCT FROM NULL to a IS [ NOT ] NULL. + *

+ * This simplifies the much more verbose DISTINCT predicate. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2440,7 +2686,14 @@ public class Settings } /** - * Sets the value of the transformPatternsNormaliseAssociativeOps property. + * Transform (a + b) + (c + d) to ((a + b) + c) + d. + *

+ * This transformation turns trees into lists, which greatly simplifies other tree traversal transformations. + * Some of those other transformations currently rely on this flag to be active. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2468,7 +2721,11 @@ public class Settings } /** - * Sets the value of the transformPatternsNormaliseInListSingleElementToComparison property. + * Transform x IN (a) to x = a and x NOT IN (a) to x != a. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2498,7 +2755,13 @@ public class Settings } /** - * Sets the value of the transformPatternsNormaliseFieldCompareValue property. + * Transform 1 = a to a = 1. + *

+ * This transformation inverses {@link TableField} [op] {@link org.jooq.impl.QOM.Val} comparisons, if they're not in that order. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2526,7 +2789,11 @@ public class Settings } /** - * Sets the value of the transformPatternsNormaliseCoalesceToNvl property. + * Transform 2 argument COALESCE(a, b) to NVL(a, b). + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2556,7 +2823,13 @@ public class Settings } /** - * Sets the value of the transformPatternsOrEqToIn property. + * Transform x = c1 OR x = c2 to x IN (c1, c2). + *

+ * This transformation simplifies verbose OR predicates into simpler IN predicates. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2586,7 +2859,13 @@ public class Settings } /** - * Sets the value of the transformPatternsAndNeToNotIn property. + * Transform x != c1 AND x != c2 to x NOT IN (c1, c2). + *

+ * This transformation simplifies verbose AND predicates into simpler NOT IN predicates. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2616,7 +2895,13 @@ public class Settings } /** - * Sets the value of the transformPatternsMergeOrComparison property. + * Transform x = a OR x > a to x >= a. + *

+ * This transformation merges multiple OR connected comparisons to a single comparison using a simpler operator. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2646,7 +2931,13 @@ public class Settings } /** - * Sets the value of the transformPatternsMergeAndComparison property. + * Transform x >= a AND x <= a to x = a. + *

+ * This transformation merges multiple AND connected comparisons to a single comparison using a simpler operator. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2676,7 +2967,13 @@ public class Settings } /** - * Sets the value of the transformPatternsMergeInLists property. + * Transform x IN (a, b, c) AND x IN (b, c, d) to x IN (b, c). + *

+ * This transformation merges multiple OR connected comparisons to a single comparison using a simpler operator. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2706,7 +3003,13 @@ public class Settings } /** - * Sets the value of the transformPatternsMergeRangePredicates property. + * Transform x >= a AND x <= b to x BETWEEN a AND b. + *

+ * This transformation merges multiple AND connected range predicates to a single comparison using BETWEEN. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2736,7 +3039,13 @@ public class Settings } /** - * Sets the value of the transformPatternsMergeBetweenSymmetricPredicates property. + * Transform x BETWEEN a AND b OR x BETWEEN b AND a to x BETWEEN SYMMETRIC a AND b. + *

+ * This transformation merges multiple OR connected BETWEEN predicates to a single comparison using BETWEEN SYMMETRIC. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2765,7 +3074,12 @@ public class Settings } /** - * Sets the value of the transformPatternsCaseSearchedToCaseSimple property. + * Transform a searched CASE WHEN x = .. WHEN x = .. to a simple CASE x WHEN … WHEN … expression. + *

+ * When a searched CASE expression always compares the same column to a value, then it can be simplified, possibly + * unlocking further transformations that are available only to the simple CASE expression. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2793,7 +3107,11 @@ public class Settings } /** - * Sets the value of the transformPatternsCaseElseNull property. + * Transform CASE … ELSE NULL removing the ELSE clause. + *

+ * CASE WHEN x THEN y ELSE NULL END is equivalent to CASE WHEN x THEN y END. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2825,7 +3143,15 @@ public class Settings } /** - * Sets the value of the transformPatternsUnreachableCaseClauses property. + * Transform CASE by removing unreachable clauses. + *

+ * Case clauses can be proven to be unreachable, and thus removed: + *

+ *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2857,7 +3183,15 @@ public class Settings } /** - * Sets the value of the transformPatternsUnreachableDecodeClauses property. + * Transform DECODE by removing unreachable clauses. + *

+ * DECODE clauses can be proven to be unreachable, and thus removed: + *

+ *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2892,7 +3226,18 @@ public class Settings } /** - * Sets the value of the transformPatternsCaseDistinctToDecode property. + * Transform CASE WHEN a IS NOT DISTINCT FROM b … to an equivalent DECODE function. + *

+ * When all WHEN clauses of a CASE expression use the DISTINCT predicate, then the + * CASE expression can be transformed into a DECODE function call: + *

+ *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2920,7 +3265,11 @@ public class Settings } /** - * Sets the value of the transformPatternsCaseMergeWhenWhen property. + * Transform CASE WHEN a THEN x WHEN b THEN x END to CASE WHEN a OR b THEN x END. + *

+ * Two consecutive WHEN clauses can be merged, if their respective THEN clause is identical. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2950,7 +3299,13 @@ public class Settings } /** - * Sets the value of the transformPatternsCaseMergeWhenElse property. + * Transform CASE WHEN a THEN x WHEN b THEN y ELSE y END to CASE WHEN a THEN x ELSE y END. + *

+ * The ultimate WHEN clause can be merged with the ELSE, if their respective result is identical. + * If the WHEN clause is the only WHEN clause, then the entire CASE expression can + * be replaced by the ELSE clause content. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -2978,7 +3333,11 @@ public class Settings } /** - * Sets the value of the transformPatternsCaseToCaseAbbreviation property. + * Transform CASE expressions to their respective abbreviations. + *

+ * Some CASE expressions have a shorter abbreviated form, such as COALESCE() or NULLIF(). + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3010,7 +3369,15 @@ public class Settings } /** - * Sets the value of the transformPatternsSimplifyCaseAbbreviation property. + * Transform complex predicates into simpler CASE abbreviations. + *

+ * Some predicates can be simplified into case abbreviations, such as, for example + *

+ *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3042,7 +3409,15 @@ public class Settings } /** - * Sets the value of the transformPatternsFlattenCaseAbbreviation property. + * Flatten nested CASE abbreviations such as NVL or CASE. + *

+ * Nested CASE abbreviations can be flattened, as such: + *

+ *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3073,7 +3448,14 @@ public class Settings } /** - * Sets the value of the transformPatternsFlattenDecode property. + * Flatten nested DECODE functions. + *

+ * Nested DECODE functions can be flattened, as such: + *

+ *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3101,7 +3483,11 @@ public class Settings } /** - * Sets the value of the transformPatternsFlattenCase property. + * Transform CASE … ELSE CASE … by flattening the nested CASE. + *

+ * CASE WHEN a THEN b ELSE CASE WHEN c THEN d END END is equivalent to CASE WHEN a THEN b WHEN c THEN d END. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3130,7 +3516,12 @@ public class Settings } /** - * Sets the value of the transformPatternsTrivialCaseAbbreviation property. + * Transform trivial case abbreviations like NVL(NULL, a) to a. + *

+ * This transformation removes any trivial case abbreviations, such as NVL(), + * COALESCE(), NULLIF(), etc. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3158,7 +3549,11 @@ public class Settings } /** - * Sets the value of the transformPatternsTrivialPredicates property. + * Transform trivial predicates like 1 = 1 to TRUE. + *

+ * This transformation removes any trivial predicates. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3186,7 +3581,11 @@ public class Settings } /** - * Sets the value of the transformPatternsTrivialBitwiseOperations property. + * Transform trivial bitwise comparisons like BIT_OR(a, 0) to a. + *

+ * This transformation removes any trivial predicates. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3212,7 +3611,9 @@ public class Settings } /** - * Sets the value of the transformPatternsBitSet property. + * Transform bitwise operations to an equivalent BIT_SET(a, b) or BIT_SET(a, b, c) expression. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3238,7 +3639,9 @@ public class Settings } /** - * Sets the value of the transformPatternsBitGet property. + * Transform bitwise operations to an equivalent BIT_GET(a, b) expression. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3266,7 +3669,11 @@ public class Settings } /** - * Sets the value of the transformPatternsScalarSubqueryCountAsteriskGtZero property. + * Transform predicates comparing scalar subqueries with a count (SELECT COUNT(*) …) > 0 to equivalent EXISTS (SELECT 1 …). + *

+ * Scalar subqueries that count rows and whose count is compared to 0 can be transformed into equivalent, but likely cheaper to execute EXISTS queries. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3294,7 +3701,11 @@ public class Settings } /** - * Sets the value of the transformPatternsScalarSubqueryCountExpressionGtZero property. + * Transform predicates comparing scalar subqueries with a count (SELECT COUNT(expr) …) > 0 to equivalent EXISTS (SELECT 1 … WHERE expr IS NOT NULL). + *

+ * Scalar subqueries that count non-null expressions and whose count is compared to 0 can be transformed into equivalent, but likely cheaper to execute EXISTS queries. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3322,7 +3733,11 @@ public class Settings } /** - * Sets the value of the transformPatternsEmptyScalarSubquery property. + * Transform empty scalar subqueries like (SELECT 1 WHERE FALSE) to NULL. + *

+ * Scalar subqueries that are guaranteed to produce no results can be replaced by a NULL value. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3352,7 +3767,13 @@ public class Settings } /** - * Sets the value of the transformPatternsNegNeg property. + * Transform -(-(x)) to x + *

+ * This transformation removes a redundant arithmetic negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3382,7 +3803,13 @@ public class Settings } /** - * Sets the value of the transformPatternsBitNotBitNot property. + * Transform ~(~(x)) to x. + *

+ * This transformation removes a redundant bitwise negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3412,7 +3839,13 @@ public class Settings } /** - * Sets the value of the transformPatternsBitNotBitNand property. + * Transform ~(bitnand(x, y)) to bitand(x, y) and ~(bitand(x, y) to bitnand(x, y). + *

+ * This transformation removes a redundant bitwise negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3442,7 +3875,13 @@ public class Settings } /** - * Sets the value of the transformPatternsBitNotBitNor property. + * Transform ~(bitnor(x, y)) to bitor(x, y) and ~(bitor(x, y) to bitnor(x, y). + *

+ * This transformation removes a redundant bitwise negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3472,7 +3911,13 @@ public class Settings } /** - * Sets the value of the transformPatternsBitNotBitXNor property. + * Transform ~(bitxnor(x, y)) to bitxor(x, y) and ~(bitxor(x, y) to bitxnor(x, y). + *

+ * This transformation removes a redundant bitwise negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3507,7 +3952,18 @@ public class Settings } /** - * Sets the value of the transformPatternsNullOnNullInput property. + * Any {org.jooq.impl.QOM.UReturnsNullOnNullInput} function or expression with NULL arguments can be replaced by NULL. + *

+ * There are many built-in SQL functions and operators with a RETURNS NULL ON NULL INPUT property, e.g. + *

+ *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3547,7 +4003,23 @@ public class Settings } /** - * Sets the value of the transformPatternsIdempotentFunctionRepetition property. + * Transform all repetitions of idempotent functions, such as UPPER(UPPER(s)) to UPPER(s). + *

+ * Idempotent functions that are covered so far, include: + *

+ *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3579,7 +4051,15 @@ public class Settings } /** - * Sets the value of the transformPatternsArithmeticComparisons property. + * Transform a + 1 = 2 to a = 2 - 1, and other transformations. + *

+ * It is usually best to compare single columns with constants or expressions to + * encourage index usage. While function based indexes are possible in some RDBMS, + * ordinary indexes are more reusable and should be preferred. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3609,7 +4089,13 @@ public class Settings } /** - * Sets the value of the transformPatternsArithmeticExpressions property. + * Transform 1 / y * x to x / y, and other transformations. + *

+ * This transformation simplifies arithmetic expressions. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3639,7 +4125,13 @@ public class Settings } /** - * Sets the value of the transformPatternsTrigonometricFunctions property. + * Transform SIN(x) / COS(x) to TAN(x), and other transformations. + *

+ * This transformation turns expanded trignonometric function definitions into their shorter equivalents. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3669,7 +4161,13 @@ public class Settings } /** - * Sets the value of the transformPatternsLogarithmicFunctions property. + * Transform LN(value) / LN(base) to LOG(base, value), and other transformations. + *

+ * This transformation turns expanded logarithmic function definitions into their shorter equivalents. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3699,7 +4197,13 @@ public class Settings } /** - * Sets the value of the transformPatternsHyperbolicFunctions property. + * Transform (EXP(x) - EXP(-x)) / 2 to SINH(x), and other transformations. + *

+ * This transformation turns expanded hyperbolic function definitions into their shorter equivalents. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3729,7 +4233,13 @@ public class Settings } /** - * Sets the value of the transformPatternsInverseHyperbolicFunctions property. + * Transform LN(x + SQRT(SQUARE(x) + 1)) to ASINH(x), and other transformations. + *

+ * This transformation turns expanded inverse hyperbolic function definitions into their shorter equivalents. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3765,7 +4275,19 @@ public class Settings } /** - * Sets the value of the transformInlineBindValuesForFieldComparisons property. + * Transform {@link org.jooq.impl.QOM.CompareCondition} and a few other types of condition to inline their bind values, in case they match + * + *

+ * Historically, prior to ANSI join syntax, joins were implemented by listing tables in + * the FROM clause and providing join predicates in the WHERE clause, possibly using vendor specific + * operators like (+) (Oracle, DB2) or *= (SQL Server) for outer join + * support. For backwards compatibility with older RDBMS versions, ANSI joins in jOOQ code may be + * converted to equivalent table lists in generated SQL using this flag. + *

+ * This flag has a limited implementation that supports inner joins (in most cases) and outer joins + * (only for simple comparison predicates). + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3800,7 +4322,18 @@ public class Settings } /** - * Sets the value of the transformAnsiJoinToTableLists property. + * Transform ANSI join to table lists if possible. + *

+ * Historically, prior to ANSI join syntax, joins were implemented by listing tables in + * the FROM clause and providing join predicates in the WHERE clause, possibly using vendor specific + * operators like (+) (Oracle, DB2) or *= (SQL Server) for outer join + * support. For backwards compatibility with older RDBMS versions, ANSI joins in jOOQ code may be + * converted to equivalent table lists in generated SQL using this flag. + *

+ * This flag has a limited implementation that supports inner joins (in most cases) and outer joins + * (only for simple comparison predicates). + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -3884,7 +4417,15 @@ public class Settings } /** - * Sets the value of the transformTableListsToAnsiJoin property. + * Transform table lists to ANSI join if possible. + *

+ * (Very) historically, prior to ANSI join syntax, joins were implemented by listing tables in + * the FROM clause and providing join predicates in the WHERE clause, possibly using vendor specific + * operators like (+) (Oracle, DB2) or *= (SQL Server) for outer join + * support. Migrating such join syntax is tedious. The jOOQ parser can parse the old syntax and + * this flag enables the transformation to ANSI join syntax. + *

+ * This feature is available in the commercial distribution only. * * @param value * allowed object is @@ -4294,7 +4835,7 @@ public class Settings } /** - * Sets the value of the executeLogging property. + * When set to true, this will add jOOQ's default {@link org.jooq.tools.LoggerListener} for debug logging. This is meant for use in development only. * * @param value * allowed object is @@ -4318,7 +4859,7 @@ public class Settings } /** - * Sets the value of the executeLoggingSQLExceptions property. + * [#14420] Whether constraint violations and other {@link java.sql.SQLException} should produce additional log information about the column name and data causing the problem. Unlike {@link #executeLogging}, this is meant for use in production as well as development. This feature is available only in commercial distributions. * * @param value * allowed object is @@ -4342,7 +4883,7 @@ public class Settings } /** - * Sets the value of the diagnosticsLogging property. + * When set to true, this will add jOOQ's default logging DiagnosticsListeners. * * @param value * allowed object is @@ -4382,7 +4923,7 @@ public class Settings } /** - * Sets the value of the updateRecordVersion property. + * Whether store(), insert(), and update() methods should update the record version prior to the operation, for use with {@link #executeWithOptimisticLocking}. * * @param value * allowed object is @@ -4406,7 +4947,7 @@ public class Settings } /** - * Sets the value of the updateRecordTimestamp property. + * Whether store(), insert(), and update() methods should update the record timestamp prior to the operation, for use with {@link #executeWithOptimisticLocking}. * * @param value * allowed object is @@ -4430,7 +4971,7 @@ public class Settings } /** - * Sets the value of the executeWithOptimisticLocking property. + * Whether store() and delete() methods should be executed with optimistic locking. * * @param value * allowed object is @@ -4457,7 +4998,10 @@ public class Settings } /** - * Sets the value of the executeWithOptimisticLockingExcludeUnversioned property. + * Whether store() and delete() methods should be executed with optimistic locking also on "unversioned" tables, + * i.e. on tables that do not have a version and/or timestamp column. + *

+ * This flag has no effect when "executeWithOptimisticLocking" is turned off. * * @param value * allowed object is @@ -4481,7 +5025,7 @@ public class Settings } /** - * Sets the value of the attachRecords property. + * Whether fetched records should be attached to the fetching configuration. * * @param value * allowed object is @@ -4505,7 +5049,7 @@ public class Settings } /** - * Sets the value of the insertUnchangedRecords property. + * Whether {@link org.jooq.TableRecord#insert()} calls should be executed if the record is unchanged. This also affects the INSERT part of {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#merge()} calls. * * @param value * allowed object is @@ -4548,7 +5092,10 @@ public class Settings } /** - * Sets the value of the updatablePrimaryKeys property. + * Whether primary key values are deemed to be "updatable" in jOOQ. + *

+ * Setting this to "true" will allow for updating primary key values through + * UpdatableRecord.store() and UpdatableRecord.update(). * * @param value * allowed object is @@ -4572,7 +5119,7 @@ public class Settings } /** - * Sets the value of the reflectionCaching property. + * Whether reflection information should be cached in the configuration. * * @param value * allowed object is @@ -4596,7 +5143,7 @@ public class Settings } /** - * Sets the value of the cacheRecordMappers property. + * Whether record mappers should be cached in the configuration. * * @param value * allowed object is @@ -4620,7 +5167,7 @@ public class Settings } /** - * Sets the value of the cacheParsingConnection property. + * Whether parsing connection translations should be cached in the configuration. * * @param value * allowed object is @@ -4660,7 +5207,7 @@ public class Settings } /** - * Sets the value of the cachePreparedStatementInLoader property. + * Whether JDBC {@link java.sql.PreparedStatement} instances should be cached in loader API. * * @param value * allowed object is @@ -4700,7 +5247,7 @@ public class Settings } /** - * Sets the value of the fetchWarnings property. + * Whether warnings should be fetched after each query execution. * * @param value * allowed object is @@ -4740,7 +5287,7 @@ public class Settings } /** - * Sets the value of the returnIdentityOnUpdatableRecord property. + * Whether calls to store(), insert() and update() should return the identity column. * * @param value * allowed object is @@ -4764,7 +5311,7 @@ public class Settings } /** - * Sets the value of the returnDefaultOnUpdatableRecord property. + * Whether calls to store(), insert() and update() should return values for columns that are {@link org.jooq.DataType#defaulted()}. * * @param value * allowed object is @@ -4788,7 +5335,7 @@ public class Settings } /** - * Sets the value of the returnComputedOnUpdatableRecord property. + * Whether calls to store(), insert() and update() should return values for columns that are {@link org.jooq.DataType#computed()}. * * @param value * allowed object is @@ -4815,7 +5362,10 @@ public class Settings } /** - * Sets the value of the returnAllOnUpdatableRecord property. + * Whether calls to store(), insert() and update() should return all columns, not just identity columns. + *

+ * Do note that only few databases support this feature. It is supported only in case the INSERT's or UPDATE's + * RETURNING clause is fully supported, also for non-IDENTITY columns. * * @param value * allowed object is @@ -4841,7 +5391,9 @@ public class Settings } /** - * Sets the value of the returnRecordToPojo property. + * Whether calls to store(), insert(), update(), and delete() that are called on an UpdatableRecord + * that is created from a POJO (e.g. in a DAO) should return all Record values to the POJO, including + * IDENTITY values, and if {@link #returnAllOnUpdatableRecord} is active, also other values. * * @param value * allowed object is @@ -4865,7 +5417,7 @@ public class Settings } /** - * Sets the value of the mapJPAAnnotations property. + * Whether JPA annotations should be considered by the DefaultRecordMapper. * * @param value * allowed object is @@ -4889,7 +5441,7 @@ public class Settings } /** - * Sets the value of the mapRecordComponentParameterNames property. + * Whether constructor parameter names obtained from the {@link java.lang.Record} component names should be considered by the DefaultRecordMapper. * * @param value * allowed object is @@ -4913,7 +5465,7 @@ public class Settings } /** - * Sets the value of the mapConstructorPropertiesParameterNames property. + * Whether constructor parameter names obtained from the {@link java.beans.ConstructorProperties} annotation should be considered by the DefaultRecordMapper. * * @param value * allowed object is @@ -4937,7 +5489,7 @@ public class Settings } /** - * Sets the value of the mapConstructorParameterNames property. + * Whether constructor parameter names obtained via reflection in Java 8+ should be considered by the DefaultRecordMapper. This flag has no effect in Java 6 or 7. * * @param value * allowed object is @@ -4961,7 +5513,7 @@ public class Settings } /** - * Sets the value of the mapConstructorParameterNamesInKotlin property. + * Whether constructor parameter names obtained via reflection in Kotlin should be considered by the DefaultRecordMapper. This flag has no effect in Java. * * @param value * allowed object is @@ -5073,7 +5625,7 @@ public class Settings } /** - * Sets the value of the debugInfoOnStackTrace property. + * [#5570] Whether exception stack traces should be enhanced with additional debug information. * * @param value * allowed object is @@ -5097,7 +5649,7 @@ public class Settings } /** - * Sets the value of the inListPadding property. + * [#5600] Whether IN lists in IN predicates should be padded to powers of inListPadBase (default 2). * * @param value * allowed object is @@ -5153,7 +5705,7 @@ public class Settings } /** - * Sets the value of the emulateOnDuplicateKeyUpdateOnPrimaryKeyOnly property. + * [#6462] Use only the primary key to emulate MySQL's INSERT .. ON DUPLICATE KEY UPDATE statement. In MySQL, the statement considers all unique keys for duplicates to apply an update rather than an insert. Earlier versions of jOOQ considered only the PRIMARY KEY. This flag can be turned on to maintain backwards compatibility. * * @param value * allowed object is @@ -5196,7 +5748,10 @@ public class Settings } /** - * Sets the value of the emulateComputedColumns property. + * [#13418] Whether computed columns should be emulated in the client. + *

+ * This can be useful if a schema was generated using a dialect that supports computed columns, but it is + * deployed on an RDBMS that does not. * * @param value * allowed object is @@ -5300,7 +5855,7 @@ public class Settings } /** - * Sets the value of the interpreterDelayForeignKeyDeclarations property. + * Using this flag, the interpreter will be able to delay the addition of foreign key declarations until the end of the interpretation run. * * @param value * allowed object is @@ -5324,7 +5879,7 @@ public class Settings } /** - * Sets the value of the metaIncludeSystemIndexes property. + * The {@link org.jooq.Meta} implementation that is backed by {@link java.sql.DatabaseMetaData} does not produce system generated indexes on constraints, by default. * * @param value * allowed object is @@ -5348,7 +5903,7 @@ public class Settings } /** - * Sets the value of the metaIncludeSystemSequences property. + * The {@link org.jooq.Meta} implementation that is backed by {@link java.sql.DatabaseMetaData} does not produce system generated sequences, by default. * * @param value * allowed object is @@ -5388,7 +5943,7 @@ public class Settings } /** - * Sets the value of the migrationHistorySchemaCreateSchemaIfNotExists property. + * Whether {@link #getMigrationHistorySchema()} should be created if it doesn't exist. * * @param value * allowed object is @@ -5428,7 +5983,7 @@ public class Settings } /** - * Sets the value of the migrationSchemataCreateSchemaIfNotExists property. + * Whether {@link #getMigrationSchemata()} should be created if they don't exist. * * @param value * allowed object is @@ -5452,7 +6007,7 @@ public class Settings } /** - * Sets the value of the migrationAllowsUndo property. + * Whether migrations are allowed to be executed in inverse order.

This is a potentially destructive feature, which should not be turned on in production. It is useful mostly to quickly switch between branches in a development environment. This feature is available only in commercial distributions. * * @param value * allowed object is @@ -5476,7 +6031,7 @@ public class Settings } /** - * Sets the value of the migrationRevertUntracked property. + * Whether migrations revert any untracked changes in the schemas that are being migrated.

This is a potentially destructive feature, which should not be turned on in production. It is useful mostly to quickly revert any elements created in a development environment. This feature is available only in commercial distributions. * * @param value * allowed object is @@ -5500,7 +6055,7 @@ public class Settings } /** - * Sets the value of the migrationAutoBaseline property. + * Whether to automatically existing schemas that are not yet managed by jOOQ Migrations. * * @param value * allowed object is @@ -5524,7 +6079,7 @@ public class Settings } /** - * Sets the value of the migrationAutoVerification property. + * Whether a migration automatically runs a verification first. * * @param value * allowed object is @@ -5548,7 +6103,7 @@ public class Settings } /** - * Sets the value of the migrationIgnoreDefaultTimestampPrecisionDiffs property. + * Various migrateTo() methods (e.g. {@link org.jooq.Meta#migrateTo(org.jooq.Meta)}) ignore the difference between TIMESTAMP and TIMESTAMP(6), if 6 is the default precision for timestamps on the configured dialect. * * @param value * allowed object is @@ -5746,7 +6301,7 @@ public class Settings } /** - * Sets the value of the parseSetCommands property. + * [#9780] Whether commands of the type SET key = value should be parsed rather than ignored. * * @param value * allowed object is @@ -5802,7 +6357,7 @@ public class Settings } /** - * Sets the value of the parseIgnoreCommercialOnlyFeatures property. + * [#13109] Whether the parser of the jOOQ Open Source Edition should ignore commercial only features, rather than failing. * * @param value * allowed object is @@ -5826,7 +6381,7 @@ public class Settings } /** - * Sets the value of the parseIgnoreComments property. + * [#8325] Whether the parser should ignore content between ignore comment tokens. * * @param value * allowed object is @@ -5888,7 +6443,13 @@ public class Settings } /** - * Sets the value of the parseRetainCommentsBetweenQueries property. + * [#12538] Whether the parser should retain comments and whitespace between queries when parsing multiple queries through {@link org.jooq.Parser#parse(String)}. + *

+ * jOOQ's query object model doesn't have a way to represent comments + * or other whitespace, and as such, the parser simply skips them by default. + * However, it may be desirable to retain comments before or in between top + * level queries, when parsing multiple such queries in a script. Comments + * inside of queries (including procedural statements) are still not supported. * * @param value * allowed object is @@ -5912,7 +6473,7 @@ public class Settings } /** - * Sets the value of the parseMetaDefaultExpressions property. + * [#8469] Whether to parse default expressions retrieved from {@link java.sql.DatabaseMetaData}. * * @param value * allowed object is @@ -5936,7 +6497,7 @@ public class Settings } /** - * Sets the value of the parseMetaViewSources property. + * [#8469] Whether to parse view sources retrieved from {@link java.sql.DatabaseMetaData}. * * @param value * allowed object is @@ -6024,7 +6585,7 @@ public class Settings } /** - * Sets the value of the applyWorkaroundFor7962 property. + * [#7963] Apply workaround for ORA-04043 when inserting into Oracle tables with qualified, quoted identifiers, and fetching generated keys * * @param value * allowed object is @@ -6084,16 +6645,36 @@ public class Settings this.parseSearchPath = parseSearchPath; } + /** + * Historically, zero-scale decimal types are generated as their most appropriate, corresponding integer type (e.g. NUMBER(2, 0) and less: Byte). The same behaviour is replicated in the {@link org.jooq.Meta} API. This flag allows for turning off this feature. + * + */ public Settings withForceIntegerTypesOnZeroScaleDecimals(Boolean value) { setForceIntegerTypesOnZeroScaleDecimals(value); return this; } + /** + * Whether any catalog name should be rendered at all. + *

+ * Use this for single-catalog environments, or when all objects are made + * available using synonyms + * + */ public Settings withRenderCatalog(Boolean value) { setRenderCatalog(value); return this; } + /** + * Whether any schema name should be rendered at all. + *

+ * Setting this to false also implicitly sets "renderCatalog" to false. + *

+ * Use this for single-schema environments, or when all objects are made + * available using synonyms + * + */ public Settings withRenderSchema(Boolean value) { setRenderSchema(value); return this; @@ -6218,6 +6799,10 @@ public class Settings return this; } + /** + * Whether rendered SQL should be pretty-printed. + * + */ public Settings withRenderFormatted(Boolean value) { setRenderFormatted(value); return this; @@ -6286,6 +6871,13 @@ public class Settings return this; } + /** + * Whether stored function calls should be wrapped in scalar subqueries. + *

+ * Oracle 11g (and potentially, other databases too) implements scalar subquery caching. With this flag + * set to true, users can automatically profit from this feature in all SQL statements. + * + */ public Settings withRenderScalarSubqueriesForStoredFunctions(Boolean value) { setRenderScalarSubqueriesForStoredFunctions(value); return this; @@ -6327,46 +6919,132 @@ public class Settings return this; } + /** + * Whether stored function calls should be wrapped in scalar subqueries. + *

+ * Oracle 11g (and potentially, other databases too) implements scalar subquery caching. With this flag + * set to true, users can automatically profit from this feature in all SQL statements. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withRenderCoalesceToEmptyStringInConcat(Boolean value) { setRenderCoalesceToEmptyStringInConcat(value); return this; } + /** + * Whether an additional ORDER BY rn clause should be rendered on emulated paginated queries. + *

+ * Older databases did not support OFFSET .. FETCH pagination, so jOOQ emulates it using derived + * tables and ROWNUM (Oracle 11g and older) or ROW_NUMBER() (e.g. DB2, + * SQL Server, etc.) filtering. While these subqueries are ordered, the ordering is not + * guaranteed to be stable in the outer most queries. It may be stable (and e.g. in Oracle, + * it mostly is, if queries are not parallel, or joined to other queries, etc.), so the excess + * ORDER BY clause may add some additional performance overhead. This setting forces + * jOOQ to not generate the additional ORDER BY clause. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/7609. + * + */ public Settings withRenderOrderByRownumberForEmulatedPagination(Boolean value) { setRenderOrderByRownumberForEmulatedPagination(value); return this; } + /** + * Whether the jOOQ RETURNING clause should map to SQL Server's OUTPUT clause. + *

+ * SQL Server supports an OUTPUT clause in most DML statements, whose behaviour + * is almost identical to RETURNING in Firebird, Oracle, PostgreSQL. Users who + * want to prevent jOOQ from rendering this OUTPUT clause can deactivate this flag + * to revert to jOOQ calling {@code java.sql.Statement#getGeneratedKeys()} instead, which + * is only supported for single row inserts. + *

+ * This OUTPUT clause does not support fetching trigger generated values. In order + * to fetch trigger generated values, {@link #fetchTriggerValuesAfterReturning} needs to + * be enabled as well. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/4498. + * + */ public Settings withRenderOutputForSQLServerReturningClause(Boolean value) { setRenderOutputForSQLServerReturningClause(value); return this; } + /** + * Whether the jOOQ GROUP_CONCAT function should be overflow-protected by setting the @@group_concat_max_len session variable in MySQL style database systems. + *

+ * MySQL truncates GROUP_CONCAT results after a certain length, which may be way + * too small for jOOQ's usage, especially when using the MULTISET emulation. By + * default, jOOQ sets a session variable to the highest possible value prior to executing a + * query containing GROUP_CONCAT. This flag can be used to opt out of this. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/12092. + * + */ public Settings withRenderGroupConcatMaxLenSessionVariable(Boolean value) { setRenderGroupConcatMaxLenSessionVariable(value); return this; } + /** + * Whether queries combined with set operators (e.g. UNION and UNION ALL) should always be surrounded by a parenthesis pair. + *

+ * By default (i.e. when this setting is set to false jOOQ will only render parenthesis pairs around queries combined with set operators when required. + * This is for example the case when set operators are nested, when non-associative operators like EXCEPT are used, or when the queries are rendered as derived tables. + *

+ * When this setting is set to true the queries combined with set operators will always be surrounded by a parenthesis pair. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/3676 and https://github.com/jOOQ/jOOQ/issues/9751. + * + */ public Settings withRenderParenthesisAroundSetOperationQueries(Boolean value) { setRenderParenthesisAroundSetOperationQueries(value); return this; } + /** + * Whether emulations that require repeating expressions should render variables for those expressions in derived tables. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/14065. + * + */ public Settings withRenderVariablesInDerivedTablesForEmulations(Boolean value) { setRenderVariablesInDerivedTablesForEmulations(value); return this; } + /** + * Whether a (a, b) < (:a, :b) row predicate should be rendered for the SEEK clause. + *

+ * Some RDBMS may support (a, b) < (:a, :b) row predicate syntax, which is very convenient for SEEK clause implementations, but fail to optimise this predicate as could be expected. + * This flag allows for expanding the predicate to the much more verbose, but equivalent (a < :a) OR (a = :a AND b < :b). Dialects without native support for row predicates aren't affected + * by this flag. + * + */ public Settings withRenderRowConditionForSeekClause(Boolean value) { setRenderRowConditionForSeekClause(value); return this; } + /** + * Whether a redundant (a <= :a) predicate should be rendered for a (a, b) < (:a, :b) predicate for the SEEK clause. + *

+ * Some RDBMS may not be able to properly optimise (a, b) < ('a', 'b') or (a < 'a') OR (a = 'a' AND b < 'b'), and choose an appropriate index. By adding an additional redundant predicate, + * jOOQ may help the optimiser, e.g. (a <= :a) AND (a, b) < ('a', 'b') or (a <= :a) AND ((a < 'a') OR (a = 'a' AND b < 'b')) + * + */ public Settings withRenderRedundantConditionForSeekClause(Boolean value) { setRenderRedundantConditionForSeekClause(value); return this; } + /** + * Whether plain SQL templates ({@link org.jooq.SQL}) are rendered as raw string content. + * + */ public Settings withRenderPlainSQLTemplatesAsRaw(Boolean value) { setRenderPlainSQLTemplatesAsRaw(value); return this; @@ -6401,16 +7079,49 @@ public class Settings return this; } + /** + * Whether the java.time (JSR 310) type {@link java.time.OffsetDateTime} should be bound natively to JDBC. + *

+ * Historically, jOOQ encoded the java.time types as strings to offer better compatibility with older JDBC drivers. By now, most drivers should support the java.time types. Using them may produce better performance both on the server and on the client side. + *

+ * This flag allows for reverting to pre-jOOQ 3.14 behaviour, where the default is to bind these types natively. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/9902. + * + */ public Settings withBindOffsetDateTimeType(Boolean value) { setBindOffsetDateTimeType(value); return this; } + /** + * Whether the java.time (JSR 310) type {@link java.time.OffsetTime} should be bound natively to JDBC. + *

+ * Historically, jOOQ encoded the java.time types as strings to offer better compatibility with older JDBC drivers. By now, most drivers should support the java.time types. Using them may produce better performance both on the server and on the client side. + *

+ * This flag allows for reverting to pre-jOOQ 3.14 behaviour, where the default is to bind these types natively. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/9902. + * + */ public Settings withBindOffsetTimeType(Boolean value) { setBindOffsetTimeType(value); return this; } + /** + * Fetch trigger values after SQL Server OUTPUT clause. + *

+ * SQL Server OUTPUT statements do not support fetching trigger generated values. + * This is a limitation of the {@link #renderOutputForSQLServerReturningClause}. An additional + * MERGE statement can run a second query if (and only if) the primary key has been + * included in the OUTPUT clause. + *

+ * For details, see https://github.com/jOOQ/jOOQ/issues/4498. + *

+ * @deprecated - 3.18.0 - [#13912] [#15316] - Use {@link #fetchTriggerValuesAfterReturning} instead. + * + */ public Settings withFetchTriggerValuesAfterSQLServerOutput(Boolean value) { setFetchTriggerValuesAfterSQLServerOutput(value); return this; @@ -6453,376 +7164,1127 @@ public class Settings return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#duplicateStatements(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + * + */ public Settings withDiagnosticsDuplicateStatements(Boolean value) { setDiagnosticsDuplicateStatements(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#duplicateStatements(org.jooq.DiagnosticsContext)} diagnostic with the {@link #transformPatterns} feature activated. + *

+ * When transforming patterns, many more complex, duplicate SQL statements can be recognised than if simply + * parsing and re-rendering the statement. This flag turns on all transformation patterns, independently of their + * individual settings. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withDiagnosticsDuplicateStatementsUsingTransformPatterns(Boolean value) { setDiagnosticsDuplicateStatementsUsingTransformPatterns(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#missingWasNullCall(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + * + */ public Settings withDiagnosticsMissingWasNullCall(Boolean value) { setDiagnosticsMissingWasNullCall(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#repeatedStatements(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + * + */ public Settings withDiagnosticsRepeatedStatements(Boolean value) { setDiagnosticsRepeatedStatements(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#consecutiveAggregation(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withDiagnosticsConsecutiveAggregation(Boolean value) { setDiagnosticsConsecutiveAggregation(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#concatenationInPredicate(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withDiagnosticsConcatenationInPredicate(Boolean value) { setDiagnosticsConcatenationInPredicate(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#possiblyWrongExpression(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withDiagnosticsPossiblyWrongExpression(Boolean value) { setDiagnosticsPossiblyWrongExpression(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#tooManyColumnsFetched(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + * + */ public Settings withDiagnosticsTooManyColumnsFetched(Boolean value) { setDiagnosticsTooManyColumnsFetched(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#tooManyRowsFetched(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + * + */ public Settings withDiagnosticsTooManyRowsFetched(Boolean value) { setDiagnosticsTooManyRowsFetched(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#unnecessaryWasNullCall(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + * + */ public Settings withDiagnosticsUnnecessaryWasNullCall(Boolean value) { setDiagnosticsUnnecessaryWasNullCall(value); return this; } + /** + * Whether to run the various pattern transformation diagnostics. + *

+ * {@link #transformPatterns} allows for applying numerous pattern transformations, which can be turned on separately when running + * diagnostics. This flag overrides the {@link #transformPatterns} flag in the diagnostics context. Individual pattern flags + * still allow to enable / disable the pattern for diagnostics. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withDiagnosticsPatterns(Boolean value) { setDiagnosticsPatterns(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#trivialCondition(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withDiagnosticsTrivialCondition(Boolean value) { setDiagnosticsTrivialCondition(value); return this; } + /** + * Whether to run the {@link org.jooq.DiagnosticsListener#nullConditoin(org.jooq.DiagnosticsContext)} diagnostic. + *

+ * Diagnostics are turned off if no {@link org.jooq.Configuration#diagnosticsListenerProviders()} are configured. + * Once configured, this diagnostic is turned on by default. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withDiagnosticsNullCondition(Boolean value) { setDiagnosticsNullCondition(value); return this; } + /** + * Transform various syntax patterns to better versions, if possible. + *

+ * This flag enables the pattern transformation feature, which consists of several sub-flags that are + * all prefixed with "transformPatterns", e.g. {@link #transformPatternsTrim}. While the sub-flags default + * to being enabled, and can be disabled on an individual basis, the global feature itself is disabled by + * default. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatterns(Boolean value) { setTransformPatterns(value); return this; } + /** + * Activate debug logging of the {@link #transformPatterns} feature. + * + */ public Settings withTransformPatternsLogging(Boolean value) { setTransformPatternsLogging(value); return this; } + /** + * Transform SELECT DISTINCT a, b FROM t GROUP BY a, b to SELECT a, b FROM t GROUP BY a, b. + *

+ * The GROUP BY clause already removes duplicates, so if the DISTINCT clause + * contains at least all the columns from GROUP BY then it can be removed. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsUnnecessaryDistinct(Boolean value) { setTransformPatternsUnnecessaryDistinct(value); return this; } + /** + * Transform SELECT (SELECT 1) to SELECT 1. + *

+ * Scalar subqueries that don't have any content other than a SELECT clause are unnecessary + * and can be removed. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsUnnecessaryScalarSubquery(Boolean value) { setTransformPatternsUnnecessaryScalarSubquery(value); return this; } + /** + * Transform SELECT * FROM t INNER JOIN u ON TRUE to SELECT * FROM t CROSS JOIN u. + *

+ * Some INNER JOIN expressions can be proven to be unnecessary. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsUnnecessaryInnerJoin(Boolean value) { setTransformPatternsUnnecessaryInnerJoin(value); return this; } + /** + * Transform SELECT a, b FROM t GROUP BY a, a, b to SELECT a, b FROM t GROUP BY a, b. + *

+ * Duplicate GROUP BY expressions can be removed. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsUnnecessaryGroupByExpressions(Boolean value) { setTransformPatternsUnnecessaryGroupByExpressions(value); return this; } + /** + * Transform SELECT a, b FROM t ORDER BY a, a, b to SELECT a, b FROM t ORDER BY a, b. + *

+ * Duplicate ORDER BY expressions can be removed. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsUnnecessaryOrderByExpressions(Boolean value) { setTransformPatternsUnnecessaryOrderByExpressions(value); return this; } + /** + * Transform [ NOT ] EXISTS (SELECT DISTINCT a, b FROM t ORDER BY c LIMIT d) to [ NOT ] EXISTS (SELECT 1 FROM t). + *

+ * In EXISTS subqueries, quite a few SELECT clauses are meaningless, and can + * thus be removed. These include: + *

+ *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsUnnecessaryExistsSubqueryClauses(Boolean value) { setTransformPatternsUnnecessaryExistsSubqueryClauses(value); return this; } + /** + * Transform COUNT(1) or any other COUNT(const) to COUNT(*). + *

+ * There is no benefit to counting a constant expression. In fact, in some RDBMS, it might even be slightly + * slower, at least in benchmarks. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsCountConstant(Boolean value) { setTransformPatternsCountConstant(value); return this; } + /** + * Transform LTRIM(RTRIM(x)) or RTRIM(LTRIM(x)) to TRIM(x). + *

+ * Historically, a few dialects did not implement TRIM(x) or TRIM(BOTH FROM x), + * so users worked around this by wrapping LTRIM() and RTRIM() with each other. + * Maintaining this is usually undesirable, so this transformation helps remove the unwanted wrapping. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsTrim(Boolean value) { setTransformPatternsTrim(value); return this; } + /** + * Transform NOT(p AND q) to NOT(p) OR NOT(q). + *

+ * This transformation normalises a predicate using De Morgan's rules. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNotAnd(Boolean value) { setTransformPatternsNotAnd(value); return this; } + /** + * Transform NOT(p OR q) to NOT(p) AND NOT(q). + *

+ * This transformation normalises a predicate using De Morgan's rules. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNotOr(Boolean value) { setTransformPatternsNotOr(value); return this; } + /** + * Transform NOT(NOT(x)) to x. + *

+ * This transformation removes a redundant logic negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNotNot(Boolean value) { setTransformPatternsNotNot(value); return this; } + /** + * Transform NOT (a != b) to a = b, and similar comparisons. + *

+ * This transformation removes a redundant logical negation from the DISTINCT predicate. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNotComparison(Boolean value) { setTransformPatternsNotComparison(value); return this; } + /** + * Transform NOT (a IS NOT DISTINCT FROM b) to a IS DISTINCT FROM b. + *

+ * This transformation removes a redundant logical negation from the DISTINCT predicate. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNotNotDistinct(Boolean value) { setTransformPatternsNotNotDistinct(value); return this; } + /** + * Transform a IS [ NOT ] DISTINCT FROM NULL to a IS [ NOT ] NULL. + *

+ * This simplifies the much more verbose DISTINCT predicate. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsDistinctFromNull(Boolean value) { setTransformPatternsDistinctFromNull(value); return this; } + /** + * Transform (a + b) + (c + d) to ((a + b) + c) + d. + *

+ * This transformation turns trees into lists, which greatly simplifies other tree traversal transformations. + * Some of those other transformations currently rely on this flag to be active. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNormaliseAssociativeOps(Boolean value) { setTransformPatternsNormaliseAssociativeOps(value); return this; } + /** + * Transform x IN (a) to x = a and x NOT IN (a) to x != a. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNormaliseInListSingleElementToComparison(Boolean value) { setTransformPatternsNormaliseInListSingleElementToComparison(value); return this; } + /** + * Transform 1 = a to a = 1. + *

+ * This transformation inverses {@link TableField} [op] {@link org.jooq.impl.QOM.Val} comparisons, if they're not in that order. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNormaliseFieldCompareValue(Boolean value) { setTransformPatternsNormaliseFieldCompareValue(value); return this; } + /** + * Transform 2 argument COALESCE(a, b) to NVL(a, b). + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNormaliseCoalesceToNvl(Boolean value) { setTransformPatternsNormaliseCoalesceToNvl(value); return this; } + /** + * Transform x = c1 OR x = c2 to x IN (c1, c2). + *

+ * This transformation simplifies verbose OR predicates into simpler IN predicates. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsOrEqToIn(Boolean value) { setTransformPatternsOrEqToIn(value); return this; } + /** + * Transform x != c1 AND x != c2 to x NOT IN (c1, c2). + *

+ * This transformation simplifies verbose AND predicates into simpler NOT IN predicates. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsAndNeToNotIn(Boolean value) { setTransformPatternsAndNeToNotIn(value); return this; } + /** + * Transform x = a OR x > a to x >= a. + *

+ * This transformation merges multiple OR connected comparisons to a single comparison using a simpler operator. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsMergeOrComparison(Boolean value) { setTransformPatternsMergeOrComparison(value); return this; } + /** + * Transform x >= a AND x <= a to x = a. + *

+ * This transformation merges multiple AND connected comparisons to a single comparison using a simpler operator. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsMergeAndComparison(Boolean value) { setTransformPatternsMergeAndComparison(value); return this; } + /** + * Transform x IN (a, b, c) AND x IN (b, c, d) to x IN (b, c). + *

+ * This transformation merges multiple OR connected comparisons to a single comparison using a simpler operator. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsMergeInLists(Boolean value) { setTransformPatternsMergeInLists(value); return this; } + /** + * Transform x >= a AND x <= b to x BETWEEN a AND b. + *

+ * This transformation merges multiple AND connected range predicates to a single comparison using BETWEEN. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsMergeRangePredicates(Boolean value) { setTransformPatternsMergeRangePredicates(value); return this; } + /** + * Transform x BETWEEN a AND b OR x BETWEEN b AND a to x BETWEEN SYMMETRIC a AND b. + *

+ * This transformation merges multiple OR connected BETWEEN predicates to a single comparison using BETWEEN SYMMETRIC. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsMergeBetweenSymmetricPredicates(Boolean value) { setTransformPatternsMergeBetweenSymmetricPredicates(value); return this; } + /** + * Transform a searched CASE WHEN x = .. WHEN x = .. to a simple CASE x WHEN … WHEN … expression. + *

+ * When a searched CASE expression always compares the same column to a value, then it can be simplified, possibly + * unlocking further transformations that are available only to the simple CASE expression. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsCaseSearchedToCaseSimple(Boolean value) { setTransformPatternsCaseSearchedToCaseSimple(value); return this; } + /** + * Transform CASE … ELSE NULL removing the ELSE clause. + *

+ * CASE WHEN x THEN y ELSE NULL END is equivalent to CASE WHEN x THEN y END. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsCaseElseNull(Boolean value) { setTransformPatternsCaseElseNull(value); return this; } + /** + * Transform CASE by removing unreachable clauses. + *

+ * Case clauses can be proven to be unreachable, and thus removed: + *

+ *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsUnreachableCaseClauses(Boolean value) { setTransformPatternsUnreachableCaseClauses(value); return this; } + /** + * Transform DECODE by removing unreachable clauses. + *

+ * DECODE clauses can be proven to be unreachable, and thus removed: + *

+ *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsUnreachableDecodeClauses(Boolean value) { setTransformPatternsUnreachableDecodeClauses(value); return this; } + /** + * Transform CASE WHEN a IS NOT DISTINCT FROM b … to an equivalent DECODE function. + *

+ * When all WHEN clauses of a CASE expression use the DISTINCT predicate, then the + * CASE expression can be transformed into a DECODE function call: + *

+ *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsCaseDistinctToDecode(Boolean value) { setTransformPatternsCaseDistinctToDecode(value); return this; } + /** + * Transform CASE WHEN a THEN x WHEN b THEN x END to CASE WHEN a OR b THEN x END. + *

+ * Two consecutive WHEN clauses can be merged, if their respective THEN clause is identical. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsCaseMergeWhenWhen(Boolean value) { setTransformPatternsCaseMergeWhenWhen(value); return this; } + /** + * Transform CASE WHEN a THEN x WHEN b THEN y ELSE y END to CASE WHEN a THEN x ELSE y END. + *

+ * The ultimate WHEN clause can be merged with the ELSE, if their respective result is identical. + * If the WHEN clause is the only WHEN clause, then the entire CASE expression can + * be replaced by the ELSE clause content. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsCaseMergeWhenElse(Boolean value) { setTransformPatternsCaseMergeWhenElse(value); return this; } + /** + * Transform CASE expressions to their respective abbreviations. + *

+ * Some CASE expressions have a shorter abbreviated form, such as COALESCE() or NULLIF(). + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsCaseToCaseAbbreviation(Boolean value) { setTransformPatternsCaseToCaseAbbreviation(value); return this; } + /** + * Transform complex predicates into simpler CASE abbreviations. + *

+ * Some predicates can be simplified into case abbreviations, such as, for example + *

+ *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsSimplifyCaseAbbreviation(Boolean value) { setTransformPatternsSimplifyCaseAbbreviation(value); return this; } + /** + * Flatten nested CASE abbreviations such as NVL or CASE. + *

+ * Nested CASE abbreviations can be flattened, as such: + *

+ *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsFlattenCaseAbbreviation(Boolean value) { setTransformPatternsFlattenCaseAbbreviation(value); return this; } + /** + * Flatten nested DECODE functions. + *

+ * Nested DECODE functions can be flattened, as such: + *

+ *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsFlattenDecode(Boolean value) { setTransformPatternsFlattenDecode(value); return this; } + /** + * Transform CASE … ELSE CASE … by flattening the nested CASE. + *

+ * CASE WHEN a THEN b ELSE CASE WHEN c THEN d END END is equivalent to CASE WHEN a THEN b WHEN c THEN d END. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsFlattenCase(Boolean value) { setTransformPatternsFlattenCase(value); return this; } + /** + * Transform trivial case abbreviations like NVL(NULL, a) to a. + *

+ * This transformation removes any trivial case abbreviations, such as NVL(), + * COALESCE(), NULLIF(), etc. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsTrivialCaseAbbreviation(Boolean value) { setTransformPatternsTrivialCaseAbbreviation(value); return this; } + /** + * Transform trivial predicates like 1 = 1 to TRUE. + *

+ * This transformation removes any trivial predicates. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsTrivialPredicates(Boolean value) { setTransformPatternsTrivialPredicates(value); return this; } + /** + * Transform trivial bitwise comparisons like BIT_OR(a, 0) to a. + *

+ * This transformation removes any trivial predicates. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsTrivialBitwiseOperations(Boolean value) { setTransformPatternsTrivialBitwiseOperations(value); return this; } + /** + * Transform bitwise operations to an equivalent BIT_SET(a, b) or BIT_SET(a, b, c) expression. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsBitSet(Boolean value) { setTransformPatternsBitSet(value); return this; } + /** + * Transform bitwise operations to an equivalent BIT_GET(a, b) expression. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsBitGet(Boolean value) { setTransformPatternsBitGet(value); return this; } + /** + * Transform predicates comparing scalar subqueries with a count (SELECT COUNT(*) …) > 0 to equivalent EXISTS (SELECT 1 …). + *

+ * Scalar subqueries that count rows and whose count is compared to 0 can be transformed into equivalent, but likely cheaper to execute EXISTS queries. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsScalarSubqueryCountAsteriskGtZero(Boolean value) { setTransformPatternsScalarSubqueryCountAsteriskGtZero(value); return this; } + /** + * Transform predicates comparing scalar subqueries with a count (SELECT COUNT(expr) …) > 0 to equivalent EXISTS (SELECT 1 … WHERE expr IS NOT NULL). + *

+ * Scalar subqueries that count non-null expressions and whose count is compared to 0 can be transformed into equivalent, but likely cheaper to execute EXISTS queries. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsScalarSubqueryCountExpressionGtZero(Boolean value) { setTransformPatternsScalarSubqueryCountExpressionGtZero(value); return this; } + /** + * Transform empty scalar subqueries like (SELECT 1 WHERE FALSE) to NULL. + *

+ * Scalar subqueries that are guaranteed to produce no results can be replaced by a NULL value. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsEmptyScalarSubquery(Boolean value) { setTransformPatternsEmptyScalarSubquery(value); return this; } + /** + * Transform -(-(x)) to x + *

+ * This transformation removes a redundant arithmetic negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNegNeg(Boolean value) { setTransformPatternsNegNeg(value); return this; } + /** + * Transform ~(~(x)) to x. + *

+ * This transformation removes a redundant bitwise negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsBitNotBitNot(Boolean value) { setTransformPatternsBitNotBitNot(value); return this; } + /** + * Transform ~(bitnand(x, y)) to bitand(x, y) and ~(bitand(x, y) to bitnand(x, y). + *

+ * This transformation removes a redundant bitwise negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsBitNotBitNand(Boolean value) { setTransformPatternsBitNotBitNand(value); return this; } + /** + * Transform ~(bitnor(x, y)) to bitor(x, y) and ~(bitor(x, y) to bitnor(x, y). + *

+ * This transformation removes a redundant bitwise negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsBitNotBitNor(Boolean value) { setTransformPatternsBitNotBitNor(value); return this; } + /** + * Transform ~(bitxnor(x, y)) to bitxor(x, y) and ~(bitxor(x, y) to bitxnor(x, y). + *

+ * This transformation removes a redundant bitwise negation. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsBitNotBitXNor(Boolean value) { setTransformPatternsBitNotBitXNor(value); return this; } + /** + * Any {org.jooq.impl.QOM.UReturnsNullOnNullInput} function or expression with NULL arguments can be replaced by NULL. + *

+ * There are many built-in SQL functions and operators with a RETURNS NULL ON NULL INPUT property, e.g. + *

+ *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsNullOnNullInput(Boolean value) { setTransformPatternsNullOnNullInput(value); return this; } + /** + * Transform all repetitions of idempotent functions, such as UPPER(UPPER(s)) to UPPER(s). + *

+ * Idempotent functions that are covered so far, include: + *

+ *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsIdempotentFunctionRepetition(Boolean value) { setTransformPatternsIdempotentFunctionRepetition(value); return this; } + /** + * Transform a + 1 = 2 to a = 2 - 1, and other transformations. + *

+ * It is usually best to compare single columns with constants or expressions to + * encourage index usage. While function based indexes are possible in some RDBMS, + * ordinary indexes are more reusable and should be preferred. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsArithmeticComparisons(Boolean value) { setTransformPatternsArithmeticComparisons(value); return this; } + /** + * Transform 1 / y * x to x / y, and other transformations. + *

+ * This transformation simplifies arithmetic expressions. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsArithmeticExpressions(Boolean value) { setTransformPatternsArithmeticExpressions(value); return this; } + /** + * Transform SIN(x) / COS(x) to TAN(x), and other transformations. + *

+ * This transformation turns expanded trignonometric function definitions into their shorter equivalents. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsTrigonometricFunctions(Boolean value) { setTransformPatternsTrigonometricFunctions(value); return this; } + /** + * Transform LN(value) / LN(base) to LOG(base, value), and other transformations. + *

+ * This transformation turns expanded logarithmic function definitions into their shorter equivalents. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsLogarithmicFunctions(Boolean value) { setTransformPatternsLogarithmicFunctions(value); return this; } + /** + * Transform (EXP(x) - EXP(-x)) / 2 to SINH(x), and other transformations. + *

+ * This transformation turns expanded hyperbolic function definitions into their shorter equivalents. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsHyperbolicFunctions(Boolean value) { setTransformPatternsHyperbolicFunctions(value); return this; } + /** + * Transform LN(x + SQRT(SQUARE(x) + 1)) to ASINH(x), and other transformations. + *

+ * This transformation turns expanded inverse hyperbolic function definitions into their shorter equivalents. + *

+ * To enable this feature, {@link #transformPatterns} must be enabled as well. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformPatternsInverseHyperbolicFunctions(Boolean value) { setTransformPatternsInverseHyperbolicFunctions(value); return this; } + /** + * Transform {@link org.jooq.impl.QOM.CompareCondition} and a few other types of condition to inline their bind values, in case they match + * + *

+ * Historically, prior to ANSI join syntax, joins were implemented by listing tables in + * the FROM clause and providing join predicates in the WHERE clause, possibly using vendor specific + * operators like (+) (Oracle, DB2) or *= (SQL Server) for outer join + * support. For backwards compatibility with older RDBMS versions, ANSI joins in jOOQ code may be + * converted to equivalent table lists in generated SQL using this flag. + *

+ * This flag has a limited implementation that supports inner joins (in most cases) and outer joins + * (only for simple comparison predicates). + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformInlineBindValuesForFieldComparisons(Boolean value) { setTransformInlineBindValuesForFieldComparisons(value); return this; } + /** + * Transform ANSI join to table lists if possible. + *

+ * Historically, prior to ANSI join syntax, joins were implemented by listing tables in + * the FROM clause and providing join predicates in the WHERE clause, possibly using vendor specific + * operators like (+) (Oracle, DB2) or *= (SQL Server) for outer join + * support. For backwards compatibility with older RDBMS versions, ANSI joins in jOOQ code may be + * converted to equivalent table lists in generated SQL using this flag. + *

+ * This flag has a limited implementation that supports inner joins (in most cases) and outer joins + * (only for simple comparison predicates). + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformAnsiJoinToTableLists(Boolean value) { setTransformAnsiJoinToTableLists(value); return this; @@ -6856,6 +8318,18 @@ public class Settings return this; } + /** + * Transform table lists to ANSI join if possible. + *

+ * (Very) historically, prior to ANSI join syntax, joins were implemented by listing tables in + * the FROM clause and providing join predicates in the WHERE clause, possibly using vendor specific + * operators like (+) (Oracle, DB2) or *= (SQL Server) for outer join + * support. Migrating such join syntax is tedious. The jOOQ parser can parse the old syntax and + * this flag enables the transformation to ANSI join syntax. + *

+ * This feature is available in the commercial distribution only. + * + */ public Settings withTransformTableListsToAnsiJoin(Boolean value) { setTransformTableListsToAnsiJoin(value); return this; @@ -7073,16 +8547,28 @@ public class Settings return this; } + /** + * When set to true, this will add jOOQ's default {@link org.jooq.tools.LoggerListener} for debug logging. This is meant for use in development only. + * + */ public Settings withExecuteLogging(Boolean value) { setExecuteLogging(value); return this; } + /** + * [#14420] Whether constraint violations and other {@link java.sql.SQLException} should produce additional log information about the column name and data causing the problem. Unlike {@link #executeLogging}, this is meant for use in production as well as development. This feature is available only in commercial distributions. + * + */ public Settings withExecuteLoggingSQLExceptions(Boolean value) { setExecuteLoggingSQLExceptions(value); return this; } + /** + * When set to true, this will add jOOQ's default logging DiagnosticsListeners. + * + */ public Settings withDiagnosticsLogging(Boolean value) { setDiagnosticsLogging(value); return this; @@ -7097,31 +8583,58 @@ public class Settings return this; } + /** + * Whether store(), insert(), and update() methods should update the record version prior to the operation, for use with {@link #executeWithOptimisticLocking}. + * + */ public Settings withUpdateRecordVersion(Boolean value) { setUpdateRecordVersion(value); return this; } + /** + * Whether store(), insert(), and update() methods should update the record timestamp prior to the operation, for use with {@link #executeWithOptimisticLocking}. + * + */ public Settings withUpdateRecordTimestamp(Boolean value) { setUpdateRecordTimestamp(value); return this; } + /** + * Whether store() and delete() methods should be executed with optimistic locking. + * + */ public Settings withExecuteWithOptimisticLocking(Boolean value) { setExecuteWithOptimisticLocking(value); return this; } + /** + * Whether store() and delete() methods should be executed with optimistic locking also on "unversioned" tables, + * i.e. on tables that do not have a version and/or timestamp column. + *

+ * This flag has no effect when "executeWithOptimisticLocking" is turned off. + * + */ public Settings withExecuteWithOptimisticLockingExcludeUnversioned(Boolean value) { setExecuteWithOptimisticLockingExcludeUnversioned(value); return this; } + /** + * Whether fetched records should be attached to the fetching configuration. + * + */ public Settings withAttachRecords(Boolean value) { setAttachRecords(value); return this; } + /** + * Whether {@link org.jooq.TableRecord#insert()} calls should be executed if the record is unchanged. This also affects the INSERT part of {@link org.jooq.UpdatableRecord#store()} and {@link org.jooq.UpdatableRecord#merge()} calls. + * + */ public Settings withInsertUnchangedRecords(Boolean value) { setInsertUnchangedRecords(value); return this; @@ -7136,21 +8649,40 @@ public class Settings return this; } + /** + * Whether primary key values are deemed to be "updatable" in jOOQ. + *

+ * Setting this to "true" will allow for updating primary key values through + * UpdatableRecord.store() and UpdatableRecord.update(). + * + */ public Settings withUpdatablePrimaryKeys(Boolean value) { setUpdatablePrimaryKeys(value); return this; } + /** + * Whether reflection information should be cached in the configuration. + * + */ public Settings withReflectionCaching(Boolean value) { setReflectionCaching(value); return this; } + /** + * Whether record mappers should be cached in the configuration. + * + */ public Settings withCacheRecordMappers(Boolean value) { setCacheRecordMappers(value); return this; } + /** + * Whether parsing connection translations should be cached in the configuration. + * + */ public Settings withCacheParsingConnection(Boolean value) { setCacheParsingConnection(value); return this; @@ -7165,6 +8697,10 @@ public class Settings return this; } + /** + * Whether JDBC {@link java.sql.PreparedStatement} instances should be cached in loader API. + * + */ public Settings withCachePreparedStatementInLoader(Boolean value) { setCachePreparedStatementInLoader(value); return this; @@ -7179,6 +8715,10 @@ public class Settings return this; } + /** + * Whether warnings should be fetched after each query execution. + * + */ public Settings withFetchWarnings(Boolean value) { setFetchWarnings(value); return this; @@ -7193,51 +8733,96 @@ public class Settings return this; } + /** + * Whether calls to store(), insert() and update() should return the identity column. + * + */ public Settings withReturnIdentityOnUpdatableRecord(Boolean value) { setReturnIdentityOnUpdatableRecord(value); return this; } + /** + * Whether calls to store(), insert() and update() should return values for columns that are {@link org.jooq.DataType#defaulted()}. + * + */ public Settings withReturnDefaultOnUpdatableRecord(Boolean value) { setReturnDefaultOnUpdatableRecord(value); return this; } + /** + * Whether calls to store(), insert() and update() should return values for columns that are {@link org.jooq.DataType#computed()}. + * + */ public Settings withReturnComputedOnUpdatableRecord(Boolean value) { setReturnComputedOnUpdatableRecord(value); return this; } + /** + * Whether calls to store(), insert() and update() should return all columns, not just identity columns. + *

+ * Do note that only few databases support this feature. It is supported only in case the INSERT's or UPDATE's + * RETURNING clause is fully supported, also for non-IDENTITY columns. + * + */ public Settings withReturnAllOnUpdatableRecord(Boolean value) { setReturnAllOnUpdatableRecord(value); return this; } + /** + * Whether calls to store(), insert(), update(), and delete() that are called on an UpdatableRecord + * that is created from a POJO (e.g. in a DAO) should return all Record values to the POJO, including + * IDENTITY values, and if {@link #returnAllOnUpdatableRecord} is active, also other values. + * + */ public Settings withReturnRecordToPojo(Boolean value) { setReturnRecordToPojo(value); return this; } + /** + * Whether JPA annotations should be considered by the DefaultRecordMapper. + * + */ public Settings withMapJPAAnnotations(Boolean value) { setMapJPAAnnotations(value); return this; } + /** + * Whether constructor parameter names obtained from the {@link java.lang.Record} component names should be considered by the DefaultRecordMapper. + * + */ public Settings withMapRecordComponentParameterNames(Boolean value) { setMapRecordComponentParameterNames(value); return this; } + /** + * Whether constructor parameter names obtained from the {@link java.beans.ConstructorProperties} annotation should be considered by the DefaultRecordMapper. + * + */ public Settings withMapConstructorPropertiesParameterNames(Boolean value) { setMapConstructorPropertiesParameterNames(value); return this; } + /** + * Whether constructor parameter names obtained via reflection in Java 8+ should be considered by the DefaultRecordMapper. This flag has no effect in Java 6 or 7. + * + */ public Settings withMapConstructorParameterNames(Boolean value) { setMapConstructorParameterNames(value); return this; } + /** + * Whether constructor parameter names obtained via reflection in Kotlin should be considered by the DefaultRecordMapper. This flag has no effect in Java. + * + */ public Settings withMapConstructorParameterNamesInKotlin(Boolean value) { setMapConstructorParameterNamesInKotlin(value); return this; @@ -7292,11 +8877,19 @@ public class Settings return this; } + /** + * [#5570] Whether exception stack traces should be enhanced with additional debug information. + * + */ public Settings withDebugInfoOnStackTrace(Boolean value) { setDebugInfoOnStackTrace(value); return this; } + /** + * [#5600] Whether IN lists in IN predicates should be padded to powers of inListPadBase (default 2). + * + */ public Settings withInListPadding(Boolean value) { setInListPadding(value); return this; @@ -7320,6 +8913,10 @@ public class Settings return this; } + /** + * [#6462] Use only the primary key to emulate MySQL's INSERT .. ON DUPLICATE KEY UPDATE statement. In MySQL, the statement considers all unique keys for duplicates to apply an update rather than an insert. Earlier versions of jOOQ considered only the PRIMARY KEY. This flag can be turned on to maintain backwards compatibility. + * + */ public Settings withEmulateOnDuplicateKeyUpdateOnPrimaryKeyOnly(Boolean value) { setEmulateOnDuplicateKeyUpdateOnPrimaryKeyOnly(value); return this; @@ -7334,6 +8931,13 @@ public class Settings return this; } + /** + * [#13418] Whether computed columns should be emulated in the client. + *

+ * This can be useful if a schema was generated using a dialect that supports computed columns, but it is + * deployed on an RDBMS that does not. + * + */ public Settings withEmulateComputedColumns(Boolean value) { setEmulateComputedColumns(value); return this; @@ -7384,16 +8988,28 @@ public class Settings return this; } + /** + * Using this flag, the interpreter will be able to delay the addition of foreign key declarations until the end of the interpretation run. + * + */ public Settings withInterpreterDelayForeignKeyDeclarations(Boolean value) { setInterpreterDelayForeignKeyDeclarations(value); return this; } + /** + * The {@link org.jooq.Meta} implementation that is backed by {@link java.sql.DatabaseMetaData} does not produce system generated indexes on constraints, by default. + * + */ public Settings withMetaIncludeSystemIndexes(Boolean value) { setMetaIncludeSystemIndexes(value); return this; } + /** + * The {@link org.jooq.Meta} implementation that is backed by {@link java.sql.DatabaseMetaData} does not produce system generated sequences, by default. + * + */ public Settings withMetaIncludeSystemSequences(Boolean value) { setMetaIncludeSystemSequences(value); return this; @@ -7408,6 +9024,10 @@ public class Settings return this; } + /** + * Whether {@link #getMigrationHistorySchema()} should be created if it doesn't exist. + * + */ public Settings withMigrationHistorySchemaCreateSchemaIfNotExists(Boolean value) { setMigrationHistorySchemaCreateSchemaIfNotExists(value); return this; @@ -7422,31 +9042,55 @@ public class Settings return this; } + /** + * Whether {@link #getMigrationSchemata()} should be created if they don't exist. + * + */ public Settings withMigrationSchemataCreateSchemaIfNotExists(Boolean value) { setMigrationSchemataCreateSchemaIfNotExists(value); return this; } + /** + * Whether migrations are allowed to be executed in inverse order.

This is a potentially destructive feature, which should not be turned on in production. It is useful mostly to quickly switch between branches in a development environment. This feature is available only in commercial distributions. + * + */ public Settings withMigrationAllowsUndo(Boolean value) { setMigrationAllowsUndo(value); return this; } + /** + * Whether migrations revert any untracked changes in the schemas that are being migrated.

This is a potentially destructive feature, which should not be turned on in production. It is useful mostly to quickly revert any elements created in a development environment. This feature is available only in commercial distributions. + * + */ public Settings withMigrationRevertUntracked(Boolean value) { setMigrationRevertUntracked(value); return this; } + /** + * Whether to automatically existing schemas that are not yet managed by jOOQ Migrations. + * + */ public Settings withMigrationAutoBaseline(Boolean value) { setMigrationAutoBaseline(value); return this; } + /** + * Whether a migration automatically runs a verification first. + * + */ public Settings withMigrationAutoVerification(Boolean value) { setMigrationAutoVerification(value); return this; } + /** + * Various migrateTo() methods (e.g. {@link org.jooq.Meta#migrateTo(org.jooq.Meta)}) ignore the difference between TIMESTAMP and TIMESTAMP(6), if 6 is the default precision for timestamps on the configured dialect. + * + */ public Settings withMigrationIgnoreDefaultTimestampPrecisionDiffs(Boolean value) { setMigrationIgnoreDefaultTimestampPrecisionDiffs(value); return this; @@ -7548,6 +9192,10 @@ public class Settings return this; } + /** + * [#9780] Whether commands of the type SET key = value should be parsed rather than ignored. + * + */ public Settings withParseSetCommands(Boolean value) { setParseSetCommands(value); return this; @@ -7571,11 +9219,19 @@ public class Settings return this; } + /** + * [#13109] Whether the parser of the jOOQ Open Source Edition should ignore commercial only features, rather than failing. + * + */ public Settings withParseIgnoreCommercialOnlyFeatures(Boolean value) { setParseIgnoreCommercialOnlyFeatures(value); return this; } + /** + * [#8325] Whether the parser should ignore content between ignore comment tokens. + * + */ public Settings withParseIgnoreComments(Boolean value) { setParseIgnoreComments(value); return this; @@ -7599,16 +9255,34 @@ public class Settings return this; } + /** + * [#12538] Whether the parser should retain comments and whitespace between queries when parsing multiple queries through {@link org.jooq.Parser#parse(String)}. + *

+ * jOOQ's query object model doesn't have a way to represent comments + * or other whitespace, and as such, the parser simply skips them by default. + * However, it may be desirable to retain comments before or in between top + * level queries, when parsing multiple such queries in a script. Comments + * inside of queries (including procedural statements) are still not supported. + * + */ public Settings withParseRetainCommentsBetweenQueries(Boolean value) { setParseRetainCommentsBetweenQueries(value); return this; } + /** + * [#8469] Whether to parse default expressions retrieved from {@link java.sql.DatabaseMetaData}. + * + */ public Settings withParseMetaDefaultExpressions(Boolean value) { setParseMetaDefaultExpressions(value); return this; } + /** + * [#8469] Whether to parse view sources retrieved from {@link java.sql.DatabaseMetaData}. + * + */ public Settings withParseMetaViewSources(Boolean value) { setParseMetaViewSources(value); return this; @@ -7650,6 +9324,10 @@ public class Settings return this; } + /** + * [#7963] Apply workaround for ORA-04043 when inserting into Oracle tables with qualified, quoted identifiers, and fetching generated keys + * + */ public Settings withApplyWorkaroundFor7962(Boolean value) { setApplyWorkaroundFor7962(value); return this;