[jOOQ/jOOQ#12494] Rename Record.changed() to Record.touched()

This commit is contained in:
Lukas Eder 2024-09-12 15:21:48 +02:00
parent b6f8e56394
commit 7308b1f2b7
69 changed files with 695 additions and 569 deletions

View File

@ -115,15 +115,25 @@ import org.jetbrains.annotations.NotNull;
*/
public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatabase {
private Boolean is0100;
private Boolean is_0_10_0;
private Boolean is_1_1_0;
boolean is0100() {
boolean is_0_10_0() {
// [#16289] The COMMENTS fields were introduced with DuckDB 0.10.0
if (is0100 == null)
is0100 = configuredDialectIsNotFamilyAndSupports(asList(DUCKDB), () -> exists(DUCKDB_TABLES.COMMENT));
if (is_0_10_0 == null)
is_0_10_0 = configuredDialectIsNotFamilyAndSupports(asList(DUCKDB), () -> exists(DUCKDB_TABLES.COMMENT));
return is0100;
return is_0_10_0;
}
boolean is_1_1_0() {
// [#16492] The CONSTRAINT_NAME field was introduced with DuckDB 1.1.0
if (is_1_1_0 == null)
is_1_1_0 = configuredDialectIsNotFamilyAndSupports(asList(DUCKDB), () -> exists(DUCKDB_CONSTRAINTS.CONSTRAINT_NAME));
return is_1_1_0;
}
@Override
@ -152,7 +162,7 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
if (catalog != null) {
SchemaDefinition schema = catalog.getSchema(record.get(DUCKDB_CONSTRAINTS.SCHEMA_NAME));
String key = record.get(DUCKDB_CONSTRAINTS.CONSTRAINT_TEXT);
String key = record.get(DUCKDB_CONSTRAINTS.CONSTRAINT_NAME);
String tableName = record.get(DUCKDB_CONSTRAINTS.TABLE_NAME);
String columnName = record.get(DUCKDB_CONSTRAINTS.CONSTRAINT_COLUMN_NAMES, String.class);
@ -170,7 +180,7 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
if (catalog != null) {
SchemaDefinition schema = catalog.getSchema(record.get(DUCKDB_CONSTRAINTS.SCHEMA_NAME));
String key = record.get(DUCKDB_CONSTRAINTS.CONSTRAINT_TEXT);
String key = record.get(DUCKDB_CONSTRAINTS.CONSTRAINT_NAME);
String tableName = record.get(DUCKDB_CONSTRAINTS.TABLE_NAME);
String columnName = record.get(DUCKDB_CONSTRAINTS.CONSTRAINT_COLUMN_NAMES, String.class);
@ -197,13 +207,15 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
DUCKDB_CONSTRAINTS.DATABASE_NAME,
DUCKDB_CONSTRAINTS.SCHEMA_NAME,
DUCKDB_CONSTRAINTS.TABLE_NAME,
DUCKDB_CONSTRAINTS.DATABASE_NAME
.concat(inline("__"))
.concat(DUCKDB_CONSTRAINTS.SCHEMA_NAME)
.concat(inline("__"))
.concat(DUCKDB_CONSTRAINTS.TABLE_NAME)
.concat(inline("__"))
.concat(DUCKDB_CONSTRAINTS.CONSTRAINT_TEXT).as(DUCKDB_CONSTRAINTS.CONSTRAINT_TEXT),
is_1_1_0()
? DUCKDB_CONSTRAINTS.CONSTRAINT_NAME
: DUCKDB_CONSTRAINTS.DATABASE_NAME
.concat(inline("__"))
.concat(DUCKDB_CONSTRAINTS.SCHEMA_NAME)
.concat(inline("__"))
.concat(DUCKDB_CONSTRAINTS.TABLE_NAME)
.concat(inline("__"))
.concat(DUCKDB_CONSTRAINTS.CONSTRAINT_TEXT).as(DUCKDB_CONSTRAINTS.CONSTRAINT_NAME),
field("unnest({0})", VARCHAR, DUCKDB_CONSTRAINTS.CONSTRAINT_COLUMN_NAMES).as(DUCKDB_CONSTRAINTS.CONSTRAINT_COLUMN_NAMES),
field("unnest({0})", INTEGER, DUCKDB_CONSTRAINTS.CONSTRAINT_COLUMN_INDEXES).as(DUCKDB_CONSTRAINTS.CONSTRAINT_COLUMN_INDEXES)
)
@ -240,7 +252,7 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
.join(pkKcu)
.on(pkKcu.CONSTRAINT_SCHEMA.eq(TABLE_CONSTRAINTS.CONSTRAINT_SCHEMA))
.and(pkKcu.CONSTRAINT_NAME.eq(TABLE_CONSTRAINTS.CONSTRAINT_NAME))
.and(pkKcu.ORDINAL_POSITION.eq(fkKcu.POSITION_IN_UNIQUE_CONSTRAINT))
.and(pkKcu.ORDINAL_POSITION.eq(fkKcu.POSITION_IN_UNIQUE_CONSTRAINT.coerce(pkKcu.ORDINAL_POSITION)))
.where(fkKcu.TABLE_SCHEMA.in(getInputSchemata()))
.orderBy(
fkKcu.TABLE_SCHEMA.asc(),
@ -474,7 +486,7 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
DUCKDB_TABLES.SCHEMA_NAME,
DUCKDB_TABLES.TABLE_NAME,
inline(TableType.TABLE.name()).as("table_type"),
is0100()
is_0_10_0()
? DUCKDB_TABLES.COMMENT
: inline(null, VARCHAR).as(DUCKDB_TABLES.COMMENT)
)
@ -488,7 +500,7 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
DUCKDB_VIEWS.SCHEMA_NAME,
DUCKDB_VIEWS.VIEW_NAME,
inline(TableType.VIEW.name()).as("table_type"),
is0100()
is_0_10_0()
? DUCKDB_VIEWS.COMMENT
: inline(null, VARCHAR).as(DUCKDB_VIEWS.COMMENT)
)

View File

@ -92,7 +92,7 @@ public class DuckDBTableDefinition extends AbstractTableDefinition {
when(
DUCKDB_TYPES.LOGICAL_TYPE.eq(inline("STRUCT")),
DUCKDB_TYPES.TYPE_NAME).as(DUCKDB_TYPES.TYPE_NAME),
((DuckDBDatabase) getDatabase()).is0100()
((DuckDBDatabase) getDatabase()).is_0_10_0()
? DUCKDB_COLUMNS.COMMENT
: inline(null, VARCHAR).as(DUCKDB_COLUMNS.COMMENT)
)

View File

@ -9,6 +9,7 @@ import java.util.List;
import org.jooq.Catalog;
import org.jooq.Table;
import org.jooq.impl.DSL;
import org.jooq.impl.SchemaImpl;
import org.jooq.meta.duckdb.system.System;
import org.jooq.meta.duckdb.system.information_schema.tables.Columns;
@ -66,7 +67,7 @@ public class InformationSchema extends SchemaImpl {
* No further instances allowed
*/
private InformationSchema() {
super("information_schema", null);
super(DSL.name("information_schema"), null, DSL.comment(""));
}

View File

@ -93,15 +93,10 @@ public class Columns extends TableImpl<Record> {
public final TableField<Record, Integer> CHARACTER_MAXIMUM_LENGTH = createField(DSL.name("character_maximum_length"), SQLDataType.INTEGER, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.character_octet_length</code>.
*/
@Deprecated
public final TableField<Record, Object> CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), SQLDataType.OTHER, this, "");
public final TableField<Record, Integer> CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), SQLDataType.INTEGER, this, "");
/**
* The column
@ -121,345 +116,178 @@ public class Columns extends TableImpl<Record> {
public final TableField<Record, Integer> NUMERIC_SCALE = createField(DSL.name("numeric_scale"), SQLDataType.INTEGER, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.datetime_precision</code>.
*/
@Deprecated
public final TableField<Record, Object> DATETIME_PRECISION = createField(DSL.name("datetime_precision"), SQLDataType.OTHER, this, "");
public final TableField<Record, Integer> DATETIME_PRECISION = createField(DSL.name("datetime_precision"), SQLDataType.INTEGER, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.interval_type</code>.
*/
@Deprecated
public final TableField<Record, Object> INTERVAL_TYPE = createField(DSL.name("interval_type"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> INTERVAL_TYPE = createField(DSL.name("interval_type"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.interval_precision</code>.
*/
@Deprecated
public final TableField<Record, Object> INTERVAL_PRECISION = createField(DSL.name("interval_precision"), SQLDataType.OTHER, this, "");
public final TableField<Record, Integer> INTERVAL_PRECISION = createField(DSL.name("interval_precision"), SQLDataType.INTEGER, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.character_set_catalog</code>.
*/
@Deprecated
public final TableField<Record, Object> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.character_set_schema</code>.
*/
@Deprecated
public final TableField<Record, Object> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.character_set_name</code>.
*/
@Deprecated
public final TableField<Record, Object> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.collation_catalog</code>.
*/
@Deprecated
public final TableField<Record, Object> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.collation_schema</code>.
*/
@Deprecated
public final TableField<Record, Object> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.collation_name</code>.
*/
@Deprecated
public final TableField<Record, Object> COLLATION_NAME = createField(DSL.name("collation_name"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> COLLATION_NAME = createField(DSL.name("collation_name"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.domain_catalog</code>.
*/
@Deprecated
public final TableField<Record, Object> DOMAIN_CATALOG = createField(DSL.name("domain_catalog"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> DOMAIN_CATALOG = createField(DSL.name("domain_catalog"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.domain_schema</code>.
*/
@Deprecated
public final TableField<Record, Object> DOMAIN_SCHEMA = createField(DSL.name("domain_schema"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> DOMAIN_SCHEMA = createField(DSL.name("domain_schema"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.domain_name</code>.
*/
@Deprecated
public final TableField<Record, Object> DOMAIN_NAME = createField(DSL.name("domain_name"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> DOMAIN_NAME = createField(DSL.name("domain_name"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.udt_catalog</code>.
*/
@Deprecated
public final TableField<Record, Object> UDT_CATALOG = createField(DSL.name("udt_catalog"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> UDT_CATALOG = createField(DSL.name("udt_catalog"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.udt_schema</code>.
*/
@Deprecated
public final TableField<Record, Object> UDT_SCHEMA = createField(DSL.name("udt_schema"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> UDT_SCHEMA = createField(DSL.name("udt_schema"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.udt_name</code>.
*/
@Deprecated
public final TableField<Record, Object> UDT_NAME = createField(DSL.name("udt_name"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> UDT_NAME = createField(DSL.name("udt_name"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.scope_catalog</code>.
*/
@Deprecated
public final TableField<Record, Object> SCOPE_CATALOG = createField(DSL.name("scope_catalog"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> SCOPE_CATALOG = createField(DSL.name("scope_catalog"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.scope_schema</code>.
*/
@Deprecated
public final TableField<Record, Object> SCOPE_SCHEMA = createField(DSL.name("scope_schema"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> SCOPE_SCHEMA = createField(DSL.name("scope_schema"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.scope_name</code>.
*/
@Deprecated
public final TableField<Record, Object> SCOPE_NAME = createField(DSL.name("scope_name"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> SCOPE_NAME = createField(DSL.name("scope_name"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.maximum_cardinality</code>.
*/
@Deprecated
public final TableField<Record, Object> MAXIMUM_CARDINALITY = createField(DSL.name("maximum_cardinality"), SQLDataType.OTHER, this, "");
public final TableField<Record, Long> MAXIMUM_CARDINALITY = createField(DSL.name("maximum_cardinality"), SQLDataType.BIGINT, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.dtd_identifier</code>.
*/
@Deprecated
public final TableField<Record, Object> DTD_IDENTIFIER = createField(DSL.name("dtd_identifier"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> DTD_IDENTIFIER = createField(DSL.name("dtd_identifier"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.is_self_referencing</code>.
*/
@Deprecated
public final TableField<Record, Object> IS_SELF_REFERENCING = createField(DSL.name("is_self_referencing"), SQLDataType.OTHER, this, "");
public final TableField<Record, Boolean> IS_SELF_REFERENCING = createField(DSL.name("is_self_referencing"), SQLDataType.BOOLEAN, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.is_identity</code>.
*/
@Deprecated
public final TableField<Record, Object> IS_IDENTITY = createField(DSL.name("is_identity"), SQLDataType.OTHER, this, "");
public final TableField<Record, Boolean> IS_IDENTITY = createField(DSL.name("is_identity"), SQLDataType.BOOLEAN, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.identity_generation</code>.
*/
@Deprecated
public final TableField<Record, Object> IDENTITY_GENERATION = createField(DSL.name("identity_generation"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> IDENTITY_GENERATION = createField(DSL.name("identity_generation"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.identity_start</code>.
*/
@Deprecated
public final TableField<Record, Object> IDENTITY_START = createField(DSL.name("identity_start"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> IDENTITY_START = createField(DSL.name("identity_start"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.identity_increment</code>.
*/
@Deprecated
public final TableField<Record, Object> IDENTITY_INCREMENT = createField(DSL.name("identity_increment"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> IDENTITY_INCREMENT = createField(DSL.name("identity_increment"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.identity_maximum</code>.
*/
@Deprecated
public final TableField<Record, Object> IDENTITY_MAXIMUM = createField(DSL.name("identity_maximum"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> IDENTITY_MAXIMUM = createField(DSL.name("identity_maximum"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.identity_minimum</code>.
*/
@Deprecated
public final TableField<Record, Object> IDENTITY_MINIMUM = createField(DSL.name("identity_minimum"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> IDENTITY_MINIMUM = createField(DSL.name("identity_minimum"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.identity_cycle</code>.
*/
@Deprecated
public final TableField<Record, Object> IDENTITY_CYCLE = createField(DSL.name("identity_cycle"), SQLDataType.OTHER, this, "");
public final TableField<Record, Boolean> IDENTITY_CYCLE = createField(DSL.name("identity_cycle"), SQLDataType.BOOLEAN, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.is_generated</code>.
*/
@Deprecated
public final TableField<Record, Object> IS_GENERATED = createField(DSL.name("is_generated"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> IS_GENERATED = createField(DSL.name("is_generated"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.columns.generation_expression</code>.
*/
@Deprecated
public final TableField<Record, Object> GENERATION_EXPRESSION = createField(DSL.name("generation_expression"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> GENERATION_EXPRESSION = createField(DSL.name("generation_expression"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column <code>system.information_schema.columns.is_updatable</code>.
*/
@Deprecated
public final TableField<Record, Object> IS_UPDATABLE = createField(DSL.name("is_updatable"), SQLDataType.OTHER, this, "");
public final TableField<Record, Boolean> IS_UPDATABLE = createField(DSL.name("is_updatable"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.information_schema.columns.COLUMN_COMMENT</code>.
*/
public final TableField<Record, String> COLUMN_COMMENT = createField(DSL.name("COLUMN_COMMENT"), SQLDataType.VARCHAR, this, "");
private Columns(Name alias, Table<Record> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
@ -503,20 +331,7 @@ public class Columns extends TableImpl<Record> {
@Override
public List<ForeignKey<Record, ?>> getReferences() {
return Arrays.asList(Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA);
}
private transient Tables _tables;
/**
* Get the implicit join path to the
* <code>system.information_schema.tables</code> table.
*/
public Tables tables() {
if (_tables == null)
_tables = new Tables(this, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, null);
return _tables;
return Arrays.asList(Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES);
}
private transient Schemata _schemata;
@ -532,6 +347,19 @@ public class Columns extends TableImpl<Record> {
return _schemata;
}
private transient Tables _tables;
/**
* Get the implicit join path to the
* <code>system.information_schema.tables</code> table.
*/
public Tables tables() {
if (_tables == null)
_tables = new Tables(this, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, null);
return _tables;
}
@Override
public Columns as(String alias) {
return new Columns(DSL.name(alias), this);

View File

@ -92,7 +92,7 @@ public class KeyColumnUsage extends TableImpl<Record> {
* The column
* <code>system.information_schema.key_column_usage.ordinal_position</code>.
*/
public final TableField<Record, Integer> ORDINAL_POSITION = createField(DSL.name("ordinal_position"), SQLDataType.INTEGER, this, "");
public final TableField<Record, Long> ORDINAL_POSITION = createField(DSL.name("ordinal_position"), SQLDataType.BIGINT, this, "");
/**
* The column

View File

@ -145,20 +145,21 @@ public class ReferentialConstraints extends TableImpl<Record> {
@Override
public List<ForeignKey<Record, ?>> getReferences() {
return Arrays.asList(Keys.SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, Keys.REFERENCING_CONSTRAINT, Keys.REFERENCED_CONSTRAINT);
return Arrays.asList(Keys.REFERENCED_CONSTRAINT, Keys.REFERENCING_CONSTRAINT, Keys.SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA);
}
private transient Schemata _schemata;
private transient TableConstraints _referencedConstraint;
/**
* Get the implicit join path to the
* <code>system.information_schema.schemata</code> table.
* <code>system.information_schema.table_constraints</code> table, via the
* <code>REFERENCED_CONSTRAINT</code> key.
*/
public Schemata schemata() {
if (_schemata == null)
_schemata = new Schemata(this, Keys.SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null);
public TableConstraints referencedConstraint() {
if (_referencedConstraint == null)
_referencedConstraint = new TableConstraints(this, Keys.REFERENCED_CONSTRAINT, null);
return _schemata;
return _referencedConstraint;
}
private transient TableConstraints _referencingConstraint;
@ -175,18 +176,17 @@ public class ReferentialConstraints extends TableImpl<Record> {
return _referencingConstraint;
}
private transient TableConstraints _referencedConstraint;
private transient Schemata _schemata;
/**
* Get the implicit join path to the
* <code>system.information_schema.table_constraints</code> table, via the
* <code>REFERENCED_CONSTRAINT</code> key.
* <code>system.information_schema.schemata</code> table.
*/
public TableConstraints referencedConstraint() {
if (_referencedConstraint == null)
_referencedConstraint = new TableConstraints(this, Keys.REFERENCED_CONSTRAINT, null);
public Schemata schemata() {
if (_schemata == null)
_schemata = new Schemata(this, Keys.SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null);
return _referencedConstraint;
return _schemata;
}
@Override

View File

@ -59,37 +59,22 @@ public class Schemata extends TableImpl<Record> {
public final TableField<Record, String> SCHEMA_OWNER = createField(DSL.name("schema_owner"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.schemata.default_character_set_catalog</code>.
*/
@Deprecated
public final TableField<Record, Object> DEFAULT_CHARACTER_SET_CATALOG = createField(DSL.name("default_character_set_catalog"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> DEFAULT_CHARACTER_SET_CATALOG = createField(DSL.name("default_character_set_catalog"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.schemata.default_character_set_schema</code>.
*/
@Deprecated
public final TableField<Record, Object> DEFAULT_CHARACTER_SET_SCHEMA = createField(DSL.name("default_character_set_schema"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> DEFAULT_CHARACTER_SET_SCHEMA = createField(DSL.name("default_character_set_schema"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.schemata.default_character_set_name</code>.
*/
@Deprecated
public final TableField<Record, Object> DEFAULT_CHARACTER_SET_NAME = createField(DSL.name("default_character_set_name"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> DEFAULT_CHARACTER_SET_NAME = createField(DSL.name("default_character_set_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.schemata.sql_path</code>.
@ -141,6 +126,19 @@ public class Schemata extends TableImpl<Record> {
return Keys.SYNTHETIC_PK_SCHEMATA;
}
private transient Columns _columns;
/**
* Get the implicit to-many join path to the
* <code>system.information_schema.columns</code> table
*/
public Columns columns() {
if (_columns == null)
_columns = new Columns(this, null, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
return _columns;
}
private transient KeyColumnUsage _keyColumnUsage;
/**
@ -180,19 +178,6 @@ public class Schemata extends TableImpl<Record> {
return _tableConstraints;
}
private transient Columns _columns;
/**
* Get the implicit to-many join path to the
* <code>system.information_schema.columns</code> table
*/
public Columns columns() {
if (_columns == null)
_columns = new Columns(this, null, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA.getInverseKey());
return _columns;
}
private transient Tables _tables;
/**

View File

@ -177,17 +177,18 @@ public class TableConstraints extends TableImpl<Record> {
return _schemata;
}
private transient KeyColumnUsage _keyColumnUsage;
private transient ReferentialConstraints _referencedConstraint;
/**
* Get the implicit to-many join path to the
* <code>system.information_schema.key_column_usage</code> table
* <code>system.information_schema.referential_constraints</code> table, via
* the <code>REFERENCED_CONSTRAINT</code> key
*/
public KeyColumnUsage keyColumnUsage() {
if (_keyColumnUsage == null)
_keyColumnUsage = new KeyColumnUsage(this, null, Keys.SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_TABLE_CONSTRAINTS.getInverseKey());
public ReferentialConstraints referencedConstraint() {
if (_referencedConstraint == null)
_referencedConstraint = new ReferentialConstraints(this, null, Keys.REFERENCED_CONSTRAINT.getInverseKey());
return _keyColumnUsage;
return _referencedConstraint;
}
private transient ReferentialConstraints _referencingConstraint;
@ -204,18 +205,17 @@ public class TableConstraints extends TableImpl<Record> {
return _referencingConstraint;
}
private transient ReferentialConstraints _referencedConstraint;
private transient KeyColumnUsage _keyColumnUsage;
/**
* Get the implicit to-many join path to the
* <code>system.information_schema.referential_constraints</code> table, via
* the <code>REFERENCED_CONSTRAINT</code> key
* <code>system.information_schema.key_column_usage</code> table
*/
public ReferentialConstraints referencedConstraint() {
if (_referencedConstraint == null)
_referencedConstraint = new ReferentialConstraints(this, null, Keys.REFERENCED_CONSTRAINT.getInverseKey());
public KeyColumnUsage keyColumnUsage() {
if (_keyColumnUsage == null)
_keyColumnUsage = new KeyColumnUsage(this, null, Keys.SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_TABLE_CONSTRAINTS.getInverseKey());
return _referencedConstraint;
return _keyColumnUsage;
}
@Override

View File

@ -67,59 +67,34 @@ public class Tables extends TableImpl<Record> {
public final TableField<Record, String> TABLE_TYPE = createField(DSL.name("table_type"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.tables.self_referencing_column_name</code>.
*/
@Deprecated
public final TableField<Record, Object> SELF_REFERENCING_COLUMN_NAME = createField(DSL.name("self_referencing_column_name"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> SELF_REFERENCING_COLUMN_NAME = createField(DSL.name("self_referencing_column_name"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.tables.reference_generation</code>.
*/
@Deprecated
public final TableField<Record, Object> REFERENCE_GENERATION = createField(DSL.name("reference_generation"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> REFERENCE_GENERATION = createField(DSL.name("reference_generation"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.tables.user_defined_type_catalog</code>.
*/
@Deprecated
public final TableField<Record, Object> USER_DEFINED_TYPE_CATALOG = createField(DSL.name("user_defined_type_catalog"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> USER_DEFINED_TYPE_CATALOG = createField(DSL.name("user_defined_type_catalog"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.tables.user_defined_type_schema</code>.
*/
@Deprecated
public final TableField<Record, Object> USER_DEFINED_TYPE_SCHEMA = createField(DSL.name("user_defined_type_schema"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> USER_DEFINED_TYPE_SCHEMA = createField(DSL.name("user_defined_type_schema"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
* The column
* <code>system.information_schema.tables.user_defined_type_name</code>.
*/
@Deprecated
public final TableField<Record, Object> USER_DEFINED_TYPE_NAME = createField(DSL.name("user_defined_type_name"), SQLDataType.OTHER, this, "");
public final TableField<Record, String> USER_DEFINED_TYPE_NAME = createField(DSL.name("user_defined_type_name"), SQLDataType.VARCHAR, this, "");
/**
* The column
@ -137,6 +112,11 @@ public class Tables extends TableImpl<Record> {
*/
public final TableField<Record, String> COMMIT_ACTION = createField(DSL.name("commit_action"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.tables.TABLE_COMMENT</code>.
*/
public final TableField<Record, String> TABLE_COMMENT = createField(DSL.name("TABLE_COMMENT"), SQLDataType.VARCHAR, this, "");
private Tables(Name alias, Table<Record> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}

View File

@ -9,6 +9,7 @@ import java.util.List;
import org.jooq.Catalog;
import org.jooq.Table;
import org.jooq.impl.DSL;
import org.jooq.impl.SchemaImpl;
import org.jooq.meta.duckdb.system.System;
import org.jooq.meta.duckdb.system.main.tables.DuckdbColumns;
@ -78,7 +79,7 @@ public class Main extends SchemaImpl {
* No further instances allowed
*/
private Main() {
super("main", null);
super(DSL.name("main"), null, DSL.comment(""));
}

View File

@ -101,6 +101,22 @@ public class DuckdbConstraints extends TableImpl<Record> {
*/
public final TableField<Record, String[]> CONSTRAINT_COLUMN_NAMES = createField(DSL.name("constraint_column_names"), SQLDataType.VARCHAR.array(), this, "");
/**
* The column <code>system.main.duckdb_constraints.constraint_name</code>.
*/
public final TableField<Record, String> CONSTRAINT_NAME = createField(DSL.name("constraint_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_constraints.referenced_table</code>.
*/
public final TableField<Record, String> REFERENCED_TABLE = createField(DSL.name("referenced_table"), SQLDataType.VARCHAR, this, "");
/**
* The column
* <code>system.main.duckdb_constraints.referenced_column_names</code>.
*/
public final TableField<Record, String[]> REFERENCED_COLUMN_NAMES = createField(DSL.name("referenced_column_names"), SQLDataType.VARCHAR.array(), this, "");
private DuckdbConstraints(Name alias, Table<Record> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}

View File

@ -13,6 +13,7 @@ import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.DefaultDataType;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
@ -59,6 +60,17 @@ public class DuckdbDatabases extends TableImpl<Record> {
*/
public final TableField<Record, String> COMMENT = createField(DSL.name("comment"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
*/
@Deprecated
public final TableField<Record, Object> TAGS = createField(DSL.name("tags"), DefaultDataType.getDefaultDataType("MAP(VARCHAR, VARCHAR)"), this, "");
/**
* The column <code>system.main.duckdb_databases.internal</code>.
*/
@ -69,6 +81,11 @@ public class DuckdbDatabases extends TableImpl<Record> {
*/
public final TableField<Record, String> TYPE = createField(DSL.name("type"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_databases.readonly</code>.
*/
public final TableField<Record, Boolean> READONLY = createField(DSL.name("readonly"), SQLDataType.BOOLEAN, this, "");
private DuckdbDatabases(Name alias, Table<Record> aliased) {
this(alias, aliased, (Field<?>[]) null, null);
}

View File

@ -13,6 +13,7 @@ import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.DefaultDataType;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
@ -84,6 +85,17 @@ public class DuckdbIndexes extends TableImpl<Record> {
*/
public final TableField<Record, String> COMMENT = createField(DSL.name("comment"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
*/
@Deprecated
public final TableField<Record, Object> TAGS = createField(DSL.name("tags"), DefaultDataType.getDefaultDataType("MAP(VARCHAR, VARCHAR)"), this, "");
/**
* The column <code>system.main.duckdb_indexes.is_unique</code>.
*/

View File

@ -13,6 +13,7 @@ import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.DefaultDataType;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
@ -64,6 +65,17 @@ public class DuckdbSchemas extends TableImpl<Record> {
*/
public final TableField<Record, String> COMMENT = createField(DSL.name("comment"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
*/
@Deprecated
public final TableField<Record, Object> TAGS = createField(DSL.name("tags"), DefaultDataType.getDefaultDataType("MAP(VARCHAR, VARCHAR)"), this, "");
/**
* The column <code>system.main.duckdb_schemas.internal</code>.
*/

View File

@ -16,6 +16,7 @@ import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.DefaultDataType;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Keys;
@ -78,6 +79,17 @@ public class DuckdbTables extends TableImpl<Record> {
*/
public final TableField<Record, String> COMMENT = createField(DSL.name("comment"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
*/
@Deprecated
public final TableField<Record, Object> TAGS = createField(DSL.name("tags"), DefaultDataType.getDefaultDataType("MAP(VARCHAR, VARCHAR)"), this, "");
/**
* The column <code>system.main.duckdb_tables.internal</code>.
*/

View File

@ -16,6 +16,7 @@ import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.DefaultDataType;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Keys;
@ -93,6 +94,17 @@ public class DuckdbTypes extends TableImpl<Record> {
*/
public final TableField<Record, String> COMMENT = createField(DSL.name("comment"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
*/
@Deprecated
public final TableField<Record, Object> TAGS = createField(DSL.name("tags"), DefaultDataType.getDefaultDataType("MAP(VARCHAR, VARCHAR)"), this, "");
/**
* The column <code>system.main.duckdb_types.internal</code>.
*/

View File

@ -13,6 +13,7 @@ import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.DefaultDataType;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
@ -74,6 +75,17 @@ public class DuckdbViews extends TableImpl<Record> {
*/
public final TableField<Record, String> COMMENT = createField(DSL.name("comment"), SQLDataType.VARCHAR, this, "");
/**
* @deprecated Unknown data type. If this is a qualified, user-defined type,
* it may have been excluded from code generation. If this is a built-in
* type, you can define an explicit {@link org.jooq.Binding} to specify how
* this type should be handled. Deprecation can be turned off using
* {@literal <deprecationOnUnknownTypes/>} in your code generator
* configuration.
*/
@Deprecated
public final TableField<Record, Object> TAGS = createField(DSL.name("tags"), DefaultDataType.getDefaultDataType("MAP(VARCHAR, VARCHAR)"), this, "");
/**
* The column <code>system.main.duckdb_views.internal</code>.
*/

View File

@ -12615,11 +12615,11 @@ public interface DSLContext extends Scope {
* implementation is governed by
* {@link Configuration#recordUnmapperProvider()}.
* <p>
* The resulting record will have its internal "changed" flags set to true
* for all values. This means that {@link UpdatableRecord#store()} will
* perform an <code>INSERT</code> statement. If you wish to store the record
* using an <code>UPDATE</code> statement, use
* {@link #executeUpdate(UpdatableRecord)} instead.
* The resulting record will have its internal {@link Record#touched()}
* flags set to true for all values. This means that
* {@link UpdatableRecord#store()} will perform an <code>INSERT</code>
* statement. If you wish to store the record using an <code>UPDATE</code>
* statement, use {@link #executeUpdate(UpdatableRecord)} instead.
* <p>
* The resulting record is attached to this {@link Configuration} by
* default. Use {@link Settings#isAttachRecords()} to override this
@ -15384,9 +15384,9 @@ public interface DSLContext extends Scope {
* </pre>
* <p>
* Unlike {@link UpdatableRecord#insert()}, this does not change any of the
* argument <code>record</code>'s internal "changed" flags, such that a
* subsequent call to {@link UpdatableRecord#insert()} might lead to another
* <code>INSERT</code> statement being executed.
* argument <code>record</code>'s internal {@link Record#touched()} flags,
* such that a subsequent call to {@link UpdatableRecord#insert()} might
* lead to another <code>INSERT</code> statement being executed.
* <p>
* Also any optimistic locking related {@link Settings} do not apply for
* this method.

View File

@ -4107,9 +4107,27 @@ extends
* .map(MY_TABLE.ID::changed)
* .forEach(System.out::println);
* </code></pre>
*
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched(Record)} instead.
*/
@Deprecated(forRemoval = true)
boolean changed(Record record);
/**
* The inverse operation of {@link Record#touched(Field)}.
* <p>
* This method can be used in its method reference form conveniently on a
* generated table, for instance, when mapping records in a stream:
* <pre><code>
* DSL.using(configuration)
* .fetch("select * from t")
* .stream()
* .map(MY_TABLE.ID::touched)
* .forEach(System.out::println);
* </code></pre>
*/
boolean touched(Record record);
/**
* The inverse operation of {@link Record#reset(Field)}.
* <p>

View File

@ -340,8 +340,8 @@ public interface InsertSetStep<R extends Record> {
* <p>
* This is the same as calling {@link #set(Map)} with the argument record
* treated as a <code>Map&lt;Field&lt;?&gt;, Object&gt;</code>, except that the
* {@link Record#changed()} flags are taken into consideration in order to
* update only changed values.
* {@link Record#touched()} flags are taken into consideration in order to
* update only touched values.
*
* @see #set(Map)
*/

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep1<R extends Record, T1> extends InsertOnDuplica
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep1<R extends Record, T1> extends InsertOnDuplica
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep10<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep10<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep11<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep11<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep12<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep12<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep13<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep13<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep14<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep14<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep15<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep15<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep16<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep16<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep17<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep17<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep18<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep18<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep19<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep19<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep2<R extends Record, T1, T2> extends InsertOnDup
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep2<R extends Record, T1, T2> extends InsertOnDup
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep20<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep20<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep21<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep21<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep22<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep22<R extends Record, T1, T2, T3, T4, T5, T6, T7
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep3<R extends Record, T1, T2, T3> extends InsertO
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep3<R extends Record, T1, T2, T3> extends InsertO
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep4<R extends Record, T1, T2, T3, T4> extends Ins
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep4<R extends Record, T1, T2, T3, T4> extends Ins
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep5<R extends Record, T1, T2, T3, T4, T5> extends
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep5<R extends Record, T1, T2, T3, T4, T5> extends
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep6<R extends Record, T1, T2, T3, T4, T5, T6> ext
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep6<R extends Record, T1, T2, T3, T4, T5, T6> ext
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep7<R extends Record, T1, T2, T3, T4, T5, T6, T7>
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep7<R extends Record, T1, T2, T3, T4, T5, T6, T7>
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep8<R extends Record, T1, T2, T3, T4, T5, T6, T7,
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep8<R extends Record, T1, T2, T3, T4, T5, T6, T7,
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -126,7 +126,7 @@ public interface InsertValuesStep9<R extends Record, T1, T2, T3, T4, T5, T6, T7,
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -144,7 +144,7 @@ public interface InsertValuesStep9<R extends Record, T1, T2, T3, T4, T5, T6, T7,
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -125,7 +125,7 @@ public interface InsertValuesStepN<R extends Record> extends InsertOnDuplicateSt
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field
@ -142,7 +142,7 @@ public interface InsertValuesStepN<R extends Record> extends InsertOnDuplicateSt
* This is equivalent to calling the other values clauses multiple times, but
* allows for dynamic construction of row arrays.
* <p>
* <strong>Note</strong>: Irrespective of individual {@link Record#changed()}
* <strong>Note</strong>: Irrespective of individual {@link Record#touched()}
* flag values, all record values are copied to the <code>VALUES</code> clause
* using {@link Record#intoArray()}, to match insert columns by position, not
* by name. If you prefer omitting unchanged values and adding values by field

View File

@ -154,8 +154,8 @@ public interface MergeMatchedSetStep<R extends Record> {
* <p>
* This is the same as calling {@link #set(Map)} with the argument record
* treated as a <code>Map&lt;Field&lt;?&gt;, Object&gt;</code>, except that the
* {@link Record#changed()} flags are taken into consideration in order to
* update only changed values.
* {@link Record#touched()} flags are taken into consideration in order to
* update only touched values.
*
* @see #set(Map)
*/

View File

@ -326,12 +326,12 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
/**
* Set a value into this record, using {@link #field(Field)} for lookup.
* <p>
* This will always set the {@link #changed(Field)} flag for the given
* This will always set the {@link #touched(Field)} flag for the given
* <code>field</code>, no matter if setting the value actually changes the
* value.
* <p>
* Changing {@link Table#getPrimaryKey()} values will set all
* {@link #changed()} flags to true, in order to produce complete
* {@link #touched()} flags to true, in order to produce complete
* <code>INSERT</code> statements on subsequent
* {@link UpdatableRecord#store()} operations.
*
@ -344,12 +344,12 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
/**
* Set a value into this record, using {@link #field(Field)} for lookup.
* <p>
* This will always set the {@link #changed(Field)} flag for the given
* This will always set the {@link #touched(Field)} flag for the given
* <code>field</code>, no matter if setting the value actually changes the
* value.
* <p>
* Changing {@link Table#getPrimaryKey()} values will set all
* {@link #changed()} flags to true, in order to produce complete
* {@link #touched()} flags to true, in order to produce complete
* <code>INSERT</code> statements on subsequent
* {@link UpdatableRecord#store()} operations.
*
@ -462,7 +462,9 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
* @see #changed(Field)
* @see #changed(int)
* @see #changed(String)
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched()} instead.
*/
@Deprecated(forRemoval = true)
boolean changed();
/**
@ -471,7 +473,9 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
*
* @see #changed()
* @see #original(Field)
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched(Field)} instead.
*/
@Deprecated(forRemoval = true)
boolean changed(Field<?> field);
/**
@ -481,7 +485,9 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
* @param fieldIndex The 0-based field index in this record.
* @see #changed()
* @see #original(int)
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched(int)} instead.
*/
@Deprecated(forRemoval = true)
boolean changed(int fieldIndex);
/**
@ -490,7 +496,9 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
*
* @see #changed()
* @see #original(String)
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched(String)} instead.
*/
@Deprecated(forRemoval = true)
boolean changed(String fieldName);
/**
@ -499,7 +507,9 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
*
* @see #changed()
* @see #original(Name)
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched(Name)} instead.
*/
@Deprecated(forRemoval = true)
boolean changed(Name fieldName);
/**
@ -513,7 +523,9 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
* @see #changed(Field, boolean)
* @see #changed(int, boolean)
* @see #changed(String, boolean)
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched(boolean)} instead.
*/
@Deprecated(forRemoval = true)
void changed(boolean changed);
/**
@ -526,7 +538,9 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
*
* @see #changed()
* @see #changed(Field)
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched(Field, boolean)} instead.
*/
@Deprecated(forRemoval = true)
void changed(Field<?> field, boolean changed);
/**
@ -540,7 +554,9 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
* @param fieldIndex The 0-based field index in this record.
* @see #changed()
* @see #changed(int)
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched(int, boolean)} instead.
*/
@Deprecated(forRemoval = true)
void changed(int fieldIndex, boolean changed);
/**
@ -553,7 +569,9 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
*
* @see #changed()
* @see #changed(String)
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched(String, boolean)} instead.
*/
@Deprecated(forRemoval = true)
void changed(String fieldName, boolean changed);
/**
@ -566,25 +584,142 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
*
* @see #changed()
* @see #changed(Name)
* @deprecated - [#12494] - 3.20.0 - Use {@link #touched(Name, boolean)} instead.
*/
@Deprecated(forRemoval = true)
void changed(Name fieldName, boolean changed);
/**
* Check if this record has been touched since it was created or fetched
* from the database.
*
* @see #original()
* @see #touched(Field)
* @see #touched(int)
* @see #touched(String)
*/
boolean touched();
/**
* Check if a field's value has been touched since the record was created or
* fetched from the database, using {@link #field(Field)} for lookup.
*
* @see #touched()
* @see #original(Field)
*/
boolean touched(Field<?> field);
/**
* Check if a field's value has been touched since the record was created or
* fetched from the database, using {@link #field(int)} for lookup.
*
* @param fieldIndex The 0-based field index in this record.
* @see #touched()
* @see #original(int)
*/
boolean touched(int fieldIndex);
/**
* Check if a field's value has been touched since the record was created or
* fetched from the database, using {@link #field(String)} for lookup.
*
* @see #touched()
* @see #original(String)
*/
boolean touched(String fieldName);
/**
* Check if a field's value has been touched since the record was created or
* fetched from the database, using {@link #field(Name)} for lookup.
*
* @see #touched()
* @see #original(Name)
*/
boolean touched(Name fieldName);
/**
* Set all of this record's internal touched flags to the supplied value.
* <p>
* If the <code>touched</code> argument is <code>false</code>, the
* {@link #original()} values will be reset to the corresponding "current"
* values as well
*
* @see #touched()
* @see #touched(Field, boolean)
* @see #touched(int, boolean)
* @see #touched(String, boolean)
*/
void touched(boolean touched);
/**
* Set this record's internal touched flag to the supplied value for a given
* field, using {@link #field(Field)} for lookup.
* <p>
* If the <code>touched</code> argument is <code>false</code>, the
* {@link #original(Field)} value will be reset to the corresponding
* "current" value as well
*
* @see #touched()
* @see #touched(Field)
*/
void touched(Field<?> field, boolean touched);
/**
* Set this record's internal touched flag to the supplied value for a given
* field.
* <p>
* If the <code>touched</code> argument is <code>false</code>, the
* {@link #original(int)} value will be reset to the corresponding "current"
* value as well
*
* @param fieldIndex The 0-based field index in this record.
* @see #touched()
* @see #touched(int)
*/
void touched(int fieldIndex, boolean touched);
/**
* Set this record's internal touched flag to the supplied value for a given
* field, using {@link #field(String)} for lookup.
* <p>
* If the <code>touched</code> argument is <code>false</code>, the
* {@link #touched(String)} value will be reset to the corresponding
* "current" value as well
*
* @see #touched()
* @see #touched(String)
*/
void touched(String fieldName, boolean touched);
/**
* Set this record's internal touched flag to the supplied value for a given
* field, using {@link #field(Name)} for lookup.
* <p>
* If the <code>touched</code> argument is <code>false</code>, the
* {@link #original(Name)} value will be reset to the corresponding
* "current" value as well
*
* @see #touched()
* @see #touched(Name)
*/
void touched(Name fieldName, boolean touched);
/**
* Reset all values to their {@link #original()} values and all
* {@link #changed()} flags to <code>false</code>.
* {@link #touched()} flags to <code>false</code>.
*/
void reset();
/**
* Reset a given value to its {@link #original(Field)} value and its
* {@link #changed(Field)} flag to <code>false</code>, using
* {@link #touched(Field)} flag to <code>false</code>, using
* {@link #field(Field)} for lookup.
*/
void reset(Field<?> field);
/**
* Reset a given value to its {@link #original(int)} value and its
* {@link #changed(int)} flag to <code>false</code>.
* {@link #touched(int)} flag to <code>false</code>.
*
* @param fieldIndex The 0-based field index in this record.
*/
@ -592,14 +727,14 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
/**
* Reset a given value to its {@link #original(String)} value and its
* {@link #changed(String)} flag to <code>false</code>, using
* {@link #touched(String)} flag to <code>false</code>, using
* {@link #field(String)} for lookup.
*/
void reset(String fieldName);
/**
* Reset a given value to its {@link #original(Name)} value and its
* {@link #changed(Name)} flag to <code>false</code>, using
* {@link #touched(Name)} flag to <code>false</code>, using
* {@link #field(Name)} for lookup.
*/
void reset(Name fieldName);
@ -1085,7 +1220,7 @@ public interface Record extends Fields, Attachable, Comparable<Record>, Formatta
* <p>
* <h5>General notes</h5>
* <p>
* The resulting record will have its internal "changed" flags set to true
* The resulting record will have its internal "touched" flags set to true
* for all values. This means that {@link UpdatableRecord#store()} will
* perform an <code>INSERT</code> statement. If you wish to store the record
* using an <code>UPDATE</code> statement, use

View File

@ -68,9 +68,9 @@ public interface TableRecord<R extends TableRecord<R>> extends QualifiedRecord<R
* Store this record to the database using an <code>INSERT</code> statement.
* <p>
* If you want to enforce re-insertion this record's values, regardless if
* the values in this record were changed, you can explicitly set the
* changed flags for all values with {@link #changed(boolean)} or for single
* values with {@link #changed(Field, boolean)}, prior to insertion.
* the values in this record were touched, you can explicitly set the
* touched flags for all values with {@link #touched(boolean)} or for single
* values with {@link #touched(Field, boolean)}, prior to insertion.
*
* @return <code>1</code> if the record was stored to the database. <code>0
* </code> if storing was not necessary and

View File

@ -132,14 +132,14 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableReco
* <li>If this record was created by client code, an <code>INSERT</code>
* statement is executed</li>
* <li>If this record was loaded by jOOQ and the primary key value was
* changed, an <code>INSERT</code> statement is executed (unless
* touched, an <code>INSERT</code> statement is executed (unless
* {@link Settings#isUpdatablePrimaryKeys()} is set). jOOQ expects that
* primary key values will never change due to the principle of
* normalisation in RDBMS. So if client code changes primary key values,
* this is interpreted by jOOQ as client code wanting to duplicate this
* record.</li>
* <li>If this record was loaded by jOOQ, and the primary key value was not
* changed, an <code>UPDATE</code> statement is executed.</li>
* touched, an <code>UPDATE</code> statement is executed.</li>
* </ul>
* <p>
* In either statement type, only those fields are inserted/updated, which
@ -231,9 +231,9 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableReco
* <h3>Statement execution enforcement</h3>
* <p>
* If you want to control statement re-execution, regardless if the values
* in this record were changed, you can explicitly set the changed flags for
* all values with {@link #changed(boolean)} or for single values with
* {@link #changed(Field, boolean)}, prior to storing. Consider also setting
* in this record were touched, you can explicitly set the touched flags for
* all values with {@link #touched(boolean)} or for single values with
* {@link #touched(Field, boolean)}, prior to storing. Consider also setting
* the flags {@link Settings#getUpdateUnchangedRecords()} and/or
* {@link Settings#isInsertUnchangedRecords()} appropriately to control if
* the record should be "touched" without any changes (<code>UPDATE</code>)
@ -290,9 +290,9 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableReco
* statement (or no statement) will always be executed.
* <p>
* If you want to enforce re-insertion this record's values, regardless if
* the values in this record were changed, you can explicitly set the
* changed flags for all values with {@link #changed(boolean)} or for single
* values with {@link #changed(Field, boolean)}, prior to insertion.
* the values in this record were touched, you can explicitly set the
* touched flags for all values with {@link #touched(boolean)} or for single
* values with {@link #touched(Field, boolean)}, prior to insertion.
* <p>
* This is the same as calling <code>record.insert(record.fields())</code>
*
@ -340,9 +340,9 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableReco
* statement (or no statement) will always be executed.
* <p>
* If you want to enforce statement execution, regardless if the values in
* this record were changed, you can explicitly set the changed flags for
* all values with {@link #changed(boolean)} or for single values with
* {@link #changed(Field, boolean)}, prior to updating, or alternatively,
* this record were touched, you can explicitly set the touched flags for
* all values with {@link #touched(boolean)} or for single values with
* {@link #touched(Field, boolean)}, prior to updating, or alternatively,
* use {@link Settings#getUpdateUnchangedRecords()}.
* <p>
* This is the same as calling <code>record.update(record.fields())</code>
@ -401,9 +401,9 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableReco
* on whether the lock values are present already in the record.
* <p>
* If you want to enforce statement execution, regardless if the values in
* this record were changed, you can explicitly set the changed flags for
* all values with {@link #changed(boolean)} or for single values with
* {@link #changed(Field, boolean)}, prior to insertion.
* this record were touched, you can explicitly set the touched flags for
* all values with {@link #touched(boolean)} or for single values with
* {@link #touched(Field, boolean)}, prior to insertion.
* <p>
* This is the same as calling <code>record.merge(record.fields())</code>
*
@ -504,7 +504,7 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableReco
* <li>{@link #valuesRow()} will have been restored to the respective values
* from the database</li>
* <li>{@link #original()} will match this record</li>
* <li>{@link #changed()} will be <code>false</code></li>
* <li>{@link #touched()} will be <code>false</code></li>
* </ul>
* <p>
* Refreshing can trigger any of the following actions:
@ -532,7 +532,7 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableReco
* <li>{@link #valuesRow()} will have been restored to the respective values
* from the database</li>
* <li>{@link #original()} will match this record</li>
* <li>{@link #changed()} will be <code>false</code></li>
* <li>{@link #touched()} will be <code>false</code></li>
* </ul>
* <p>
* Refreshing can trigger any of the following actions:
@ -560,7 +560,7 @@ public interface UpdatableRecord<R extends UpdatableRecord<R>> extends TableReco
* <li>{@link #valuesRow()} will have been restored to the respective values
* from the database</li>
* <li>{@link #original()} will match this record</li>
* <li>{@link #changed()} will be <code>false</code></li>
* <li>{@link #touched()} will be <code>false</code></li>
* </ul>
* <p>
* Refreshing can trigger any of the following actions:

View File

@ -129,8 +129,8 @@ public interface UpdateSetStep<R extends Record> {
* <p>
* This is the same as calling {@link #set(Map)} with the argument record
* treated as a <code>Map&lt;Field&lt;?&gt;, Object&gt;</code>, except that the
* {@link Record#changed()} flags are taken into consideration in order to
* update only changed values.
* {@link Record#touched()} flags are taken into consideration in order to
* update only touched values.
*
* @see #set(Map)
*/

View File

@ -174,6 +174,11 @@ implements
return record.changed(this);
}
@Override
public final boolean touched(Record record) {
return record.touched(this);
}
@Override
public final void reset(Record record) {
record.reset(this);

View File

@ -48,7 +48,6 @@ import static org.jooq.impl.Tools.converterContext;
import static org.jooq.impl.Tools.embeddedFields;
import static org.jooq.impl.Tools.indexFail;
import static org.jooq.impl.Tools.indexOrFail;
import static org.jooq.impl.Tools.resetChangedOnNotNull;
import static org.jooq.impl.Tools.settings;
import java.io.Writer;
@ -131,7 +130,7 @@ implements
final AbstractRow<? extends AbstractRecord> fields;
final Object[] values;
final Object[] originals;
final BitSet changed;
final BitSet touched;
boolean fetched;
/**
@ -156,7 +155,7 @@ implements
this.fields = (AbstractRow<? extends AbstractRecord>) fields;
this.values = new Object[size];
this.originals = new Object[size];
this.changed = new BitSet(size);
this.touched = new BitSet(size);
}
// ------------------------------------------------------------------------
@ -319,35 +318,34 @@ implements
// Normal fields' changed flag is always set to true
if (key == null || !key.getFields().contains(field)) {
changed.set(index);
touched.set(index);
}
// The primary key's changed flag might've been set previously
else if (changed.get(index)) {
changed.set(index);
else if (touched.get(index)) {
touched.set(index);
}
// [#2764] Users may override updatability of primary key values
else if (updatablePrimaryKeys(settings(this))) {
changed.set(index);
touched.set(index);
}
// [#2698] If the primary key has not yet been set
else if (originals[index] == null) {
changed.set(index);
touched.set(index);
}
// [#979] If the primary key is being changed, all other fields' flags
// [#979] If the primary key is being touched, all other fields' flags
// need to be set to true for in case this record is stored again, an
// INSERT statement will thus be issued
else {
// [#945] Be sure that changed is never reset to false
changed.set(index, changed.get(index) || !StringUtils.equals(values[index], value));
// [#945] Be sure that touched is never reset to false
touched.set(index, touched.get(index) || !StringUtils.equals(values[index], value));
if (changed.get(index)) {
changed(true);
}
if (touched.get(index))
touched(true);
}
values[index] = value;
@ -379,7 +377,7 @@ implements
values[targetIndex] = record.get(sourceIndex);
originals[targetIndex] = record.original(sourceIndex);
changed.set(targetIndex, record.changed(sourceIndex));
touched.set(targetIndex, record.touched(sourceIndex));
}
}
@ -432,33 +430,93 @@ implements
}
@Override
@Deprecated
public final boolean changed() {
return !changed.isEmpty();
return touched();
}
@Override
@Deprecated
public final boolean changed(Field<?> field) {
return changed(indexOrFail(fields, field));
return touched(field);
}
@Override
@Deprecated
public final boolean changed(int fieldIndex) {
return changed.get(safeIndex(fieldIndex));
return touched(fieldIndex);
}
@Override
@Deprecated
public final boolean changed(String fieldName) {
return changed(indexOrFail(fields, fieldName));
return touched(fieldName);
}
@Override
@Deprecated
public final boolean changed(Name fieldName) {
return changed(indexOrFail(fields, fieldName));
return touched(fieldName);
}
@Override
@Deprecated
public final void changed(boolean c) {
changed.set(0, values.length, c);
touched(c);
}
@Override
@Deprecated
public final void changed(Field<?> field, boolean c) {
touched(field, c);
}
@Override
@Deprecated
public final void changed(int fieldIndex, boolean c) {
touched(fieldIndex, c);
}
@Override
@Deprecated
public final void changed(String fieldName, boolean c) {
touched(fieldName, c);
}
@Override
@Deprecated
public final void changed(Name fieldName, boolean c) {
touched(fieldName, c);
}
@Override
public final boolean touched() {
return !touched.isEmpty();
}
@Override
public final boolean touched(Field<?> field) {
return touched(indexOrFail(fields, field));
}
@Override
public final boolean touched(int fieldIndex) {
return touched.get(safeIndex(fieldIndex));
}
@Override
public final boolean touched(String fieldName) {
return touched(indexOrFail(fields, fieldName));
}
@Override
public final boolean touched(Name fieldName) {
return touched(indexOrFail(fields, fieldName));
}
@Override
public final void touched(boolean c) {
touched.set(0, values.length, c);
// [#1995] If a value is meant to be "unchanged", the "original" should
// match the supposedly "unchanged" value.
@ -468,15 +526,15 @@ implements
}
@Override
public final void changed(Field<?> field, boolean c) {
changed(indexOrFail(fields, field), c);
public final void touched(Field<?> field, boolean c) {
touched(indexOrFail(fields, field), c);
}
@Override
public final void changed(int fieldIndex, boolean c) {
public final void touched(int fieldIndex, boolean c) {
safeIndex(fieldIndex);
changed.set(fieldIndex, c);
touched.set(fieldIndex, c);
// [#1995] If a value is meant to be "unchanged", the "original" should
// match the supposedly "unchanged" value.
@ -485,18 +543,18 @@ implements
}
@Override
public final void changed(String fieldName, boolean c) {
changed(indexOrFail(fields, fieldName), c);
public final void touched(String fieldName, boolean c) {
touched(indexOrFail(fields, fieldName), c);
}
@Override
public final void changed(Name fieldName, boolean c) {
changed(indexOrFail(fields, fieldName), c);
public final void touched(Name fieldName, boolean c) {
touched(indexOrFail(fields, fieldName), c);
}
@Override
public final void reset() {
changed.clear();
touched.clear();
System.arraycopy(originals, 0, values, 0, originals.length);
}
@ -510,7 +568,7 @@ implements
public final void reset(int fieldIndex) {
safeIndex(fieldIndex);
changed.clear(fieldIndex);
touched.clear(fieldIndex);
values[fieldIndex] = originals[fieldIndex];
}
@ -748,7 +806,7 @@ implements
t.values[targetIndex] = targetType.convert(values[sourceIndex]);
t.originals[targetIndex] = targetType.convert(originals[sourceIndex]);
t.changed.set(targetIndex, changed.get(sourceIndex));
t.touched.set(targetIndex, touched.get(sourceIndex));
}
}
}
@ -793,14 +851,24 @@ implements
// [#2700] [#3582] If a POJO attribute is NULL, but the column is NOT NULL
// then we should let the database apply DEFAULT values
Tools.resetChangedOnNotNull(this);
Tools.resetTouchedOnNotNull(this);
}
/**
* Generated subclasses may call this method.
*
* @deprecated - [#12494] - 3.20.0 - Please re-generate your code
*/
@Deprecated
protected /* non-final */ void resetChangedOnNotNull() {
resetTouchedOnNotNull();
}
/**
* Generated subclasses may call this method.
*/
protected /* non-final */ void resetChangedOnNotNull() {
Tools.resetChangedOnNotNull(this);
protected /* non-final */ void resetTouchedOnNotNull() {
Tools.resetTouchedOnNotNull(this);
}
private final Object prepareArrayOrIterableForUnmap(Object source, int[] targetIndexMapping) {
@ -918,7 +986,7 @@ implements
for (Field<?> field : fields.fields.fields) {
Field<?> sourceField = source.field(field);
if (sourceField != null && source.changed(sourceField))
if (sourceField != null && source.touched(sourceField))
Tools.setValue(this, field, source, sourceField, cc);
}
}
@ -931,7 +999,7 @@ implements
int j = indexMapping == null ? i : indexMapping[i];
// [#12697] Don't re-apply data type conversion, assuming it already happened
if (source.field(j) != null && source.changed(j))
if (source.field(j) != null && source.touched(j))
set((Field) field(j), j, source.get(j));
}
}

View File

@ -173,7 +173,7 @@ abstract class AbstractResult<R extends Record> extends AbstractFormattable impl
// Collect all decimal places for the column values
for (R record : buffer)
decimalPlacesList.add(decimalPlaces(format0(record.get(index), record.changed(index), true)));
decimalPlacesList.add(decimalPlaces(format0(record.get(index), record.touched(index), true)));
// Find max
decimalPlaces[index] = Collections.max(decimalPlacesList);
@ -197,7 +197,7 @@ abstract class AbstractResult<R extends Record> extends AbstractFormattable impl
// Add column values width
for (R record : buffer) {
String value = format0(record.get(index), record.changed(index), true);
String value = format0(record.get(index), record.touched(index), true);
// Align number values before width is calculated
if (isNumCol)
@ -283,7 +283,7 @@ abstract class AbstractResult<R extends Record> extends AbstractFormattable impl
StringUtils.replace(
StringUtils.replace(
StringUtils.replace(
format0(record.get(index), record.changed(index), true), "\n", "{lf}"
format0(record.get(index), record.touched(index), true), "\n", "{lf}"
), "\r", "{cr}"
), "\t", "{tab}"
);
@ -1402,10 +1402,10 @@ abstract class AbstractResult<R extends Record> extends AbstractFormattable impl
* @param visual Whether the formatted output is to be consumed visually
* (HTML, TEXT) or by a machine (CSV, JSON, XML)
*/
static final String format0(Object value, boolean changed, boolean visual) {
static final String format0(Object value, boolean touched, boolean visual) {
// [#2741] TODO: This logic will be externalised in new SPI
String formatted = changed && visual ? "*" : "";
String formatted = touched && visual ? "*" : "";
if (value == null) {
formatted += visual ? "{null}" : null;

View File

@ -73,7 +73,7 @@ implements
@Override
public final void setRecord(R record) {
for (int i = 0; i < record.size(); i++)
if (record.changed(i))
if (record.touched(i))
addValue((Field) record.field(i), record.get(i));
}

View File

@ -256,7 +256,7 @@ final class BatchCRUD extends AbstractBatch {
// calls to store() will insert them again
// 2. Stored records should be marked as unchanged
for (TableRecord<?> record : records) {
record.changed(action == Action.DELETE);
record.touched(action == Action.DELETE);
// [#3362] If new records (fetched = false) are batch-stored twice in a row, the second
// batch-store needs to generate an UPDATE statement.

View File

@ -479,9 +479,9 @@ public abstract class DAOImpl<R extends UpdatableRecord<R>, P, T> implements DAO
if (forUpdate && pk != null)
for (Field<?> field : pk)
record.changed(field, false);
record.touched(field, false);
Tools.resetChangedOnNotNull(record);
Tools.resetTouchedOnNotNull(record);
result.add(record);
}

View File

@ -4393,7 +4393,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
DefaultBindingGetResultSetContext<?> c = new DefaultBindingGetResultSetContext<>(ctx.executeContext(), ctx.resultSet(), ctx.index());
r.field(0).getBinding().get((BindingGetResultSetContext) c);
r.fromArray(c.value());
r.changed(false);
r.touched(false);
return r;
}));
}
@ -4592,7 +4592,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
for (int i = 0; i < row.size(); i++)
pgSetValue(ctx, r, row.field(i), values.get(i));
r.changed(false);
r.touched(false);
return r;
});
}
@ -4753,7 +4753,7 @@ public class DefaultBinding<T, U> implements Binding<T, U> {
result.add(newRecord(true, recordType, row, c).operate(r -> {
r.from(asList(s));
r.changed(false);
r.touched(false);
return r;
}));

View File

@ -277,6 +277,6 @@ class HistoryRecord extends UpdatableRecordImpl<HistoryRecord> {
setStatusMessage(statusMessage);
setResolution(resolution);
setResolutionMessage(resolutionMessage);
resetChangedOnNotNull();
resetTouchedOnNotNull();
}
}

View File

@ -1239,7 +1239,7 @@ final class InsertImpl<R extends Record, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10
@Override
public final InsertImpl set(Record record) {
return set(Tools.mapOfChangedValues(record));
return set(Tools.mapOfTouchedValues(record));
}
@Override

View File

@ -307,7 +307,7 @@ implements
@Override
public final void setRecordForUpdate(R record) {
for (int i = 0; i < record.size(); i++)
if (record.changed(i))
if (record.touched(i))
addValueForUpdate((Field) record.field(i), record.get(i));
}

View File

@ -197,7 +197,7 @@ final class JSONReader<R extends Record> {
else
r.fromMap(record);
r.changed(false);
r.touched(false);
return r;
}));
}
@ -220,7 +220,7 @@ final class JSONReader<R extends Record> {
else
result.add(newRecord(true, recordType, actualRow, ctx.configuration()).operate(r -> {
r.from(record);
r.changed(false);
r.touched(false);
return r;
}));
}
@ -299,7 +299,7 @@ final class JSONReader<R extends Record> {
record.set(i, newRecord(true, recordType, actualRow, ctx.configuration()).operate(r -> {
r.from(l);
r.changed(false);
r.touched(false);
return r;
}));
}

View File

@ -97,7 +97,7 @@ final class ListHandler<R extends Record> {
}
r.fromArray(attributes);
r.changed(false);
r.touched(false);
return r;
}
else

View File

@ -1020,7 +1020,7 @@ implements
@Override
public final MergeImpl set(Record record) {
return set(Tools.mapOfChangedValues(record));
return set(Tools.mapOfTouchedValues(record));
}
@Override

View File

@ -394,7 +394,7 @@ final class MigrationImpl extends AbstractScope implements Migration {
HistoryRecord record = history.currentHistoryRecord(false);
if (record == null || !StringUtils.equals(e.record.getId(), record.getId())) {
e.record.changed(true);
e.record.touched(true);
e.record.insert();
}

View File

@ -180,7 +180,7 @@ implements
final int storeInsert0(Field<?>[] storeFields) {
DSLContext create = create();
InsertQuery<R> insert = create.insertQuery(getTable());
List<Field<?>> changedFields = addChangedValues(storeFields, insert, false);
List<Field<?>> changedFields = addTouchedValues(storeFields, insert, false);
if (changedFields.isEmpty()) {
@ -209,7 +209,7 @@ implements
if (result > 0) {
for (Field<?> changedField : changedFields)
changed(changedField, false);
touched(changedField, false);
// [#1596] If insert was successful, update timestamp and/or version columns
setRecordVersionAndTimestamp(version, timestamp);
@ -289,7 +289,7 @@ implements
values[fieldIndex] = value;
originals[fieldIndex] = value;
changed.clear(fieldIndex);
touched.clear(fieldIndex);
}
if (timestamp != null) {
TableField<R, ?> field = getTable().getRecordTimestamp();
@ -298,19 +298,19 @@ implements
values[fieldIndex] = value;
originals[fieldIndex] = value;
changed.clear(fieldIndex);
touched.clear(fieldIndex);
}
}
/**
* Set all changed values of this record to a store query.
* Set all touched values of this record to a store query.
*/
final List<Field<?>> addChangedValues(Field<?>[] storeFields, StoreQuery<R> query, boolean forUpdate) {
final List<Field<?>> addTouchedValues(Field<?>[] storeFields, StoreQuery<R> query, boolean forUpdate) {
FieldsImpl<Record> f = new FieldsImpl<>(storeFields);
List<Field<?>> result = new ArrayList<>();
for (Field<?> field : fields.fields.fields) {
if (changed(field) && f.field(field) != null && writable(field, forUpdate)) {
if (touched(field) && f.field(field) != null && writable(field, forUpdate)) {
addValue(query, field, forUpdate);
result.add(field);
}

View File

@ -1574,13 +1574,13 @@ final class Tools {
* [#2700] [#3582] If a POJO attribute is NULL, but the column is NOT NULL
* then we should let the database apply DEFAULT values
*/
static final void resetChangedOnNotNull(Record record) {
static final void resetTouchedOnNotNull(Record record) {
int size = record.size();
for (int i = 0; i < size; i++)
if (record.get(i) == null)
if (!record.field(i).getDataType().nullable())
record.changed(i, false);
record.touched(i, false);
}
/**
@ -2790,12 +2790,12 @@ final class Tools {
/**
* Turn a {@link Record} into a {@link Map}
*/
static final Map<Field<?>, Object> mapOfChangedValues(Record record) {
static final Map<Field<?>, Object> mapOfTouchedValues(Record record) {
Map<Field<?>, Object> result = new LinkedHashMap<>();
int size = record.size();
for (int i = 0; i < size; i++)
if (record.changed(i))
if (record.touched(i))
result.put(record.field(i), record.get(i));
return result;
@ -3748,7 +3748,7 @@ final class Tools {
target.values[targetIndex] = targetType.convert(source.get(sourceIndex));
target.originals[targetIndex] = targetType.convert(source.original(sourceIndex));
target.changed.set(targetIndex, source.changed(sourceIndex));
target.touched.set(targetIndex, source.touched(sourceIndex));
}
/**
@ -4291,7 +4291,7 @@ final class Tools {
*/
static final <T> void addCondition(org.jooq.ConditionProvider provider, Record record, Field<T> field) {
// [#2764] If primary keys are allowed to be changed, the
// [#2764] If primary keys are allowed to be touched, the
if (updatablePrimaryKeys(settings(record)))
provider.addConditions(condition(field, record.original(field)));
else

View File

@ -206,8 +206,8 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
else {
for (TableField<R, ?> field : keys) {
// If any primary key value is null or changed
if (changed(field) ||
// If any primary key value is null or touched
if (touched(field) ||
// [#3237] or if a NOT NULL primary key value is null, then execute an INSERT
(field.getDataType().nullable() == false && get(field) == null)) {
@ -294,13 +294,13 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
Q query,
boolean merge
) {
List<Field<?>> changedFields = addChangedValues(storeFields, query, merge);
List<Field<?>> touchedFields = addTouchedValues(storeFields, query, merge);
// [#11552] These conditions should be omitted in the MERGE case
if (!merge)
Tools.addConditions(query, this, keys);
if (changedFields.isEmpty()) {
if (touchedFields.isEmpty()) {
switch (StringUtils.defaultIfNull(create().settings().getUpdateUnchangedRecords(), UpdateUnchangedRecords.NEVER)) {
// Don't store records if no value was set by client code
@ -326,9 +326,9 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
case SET_NON_PRIMARY_KEY_TO_RECORD_VALUES:
for (Field<?> field : storeFields)
if (!asList(keys).contains(field))
changed(field, true);
touched(field, true);
addChangedValues(storeFields, query, merge);
addTouchedValues(storeFields, query, merge);
break;
}
}
@ -362,8 +362,8 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
checkIfChanged(result, version, timestamp);
if (result > 0) {
for (Field<?> changedField : changedFields)
changed(changedField, false);
for (Field<?> touchedField : touchedFields)
touched(touchedField, false);
// [#1859] If an update was successful try fetching the generated
getReturningIfNeeded(query, key);
@ -420,7 +420,7 @@ public class UpdatableRecordImpl<R extends UpdatableRecord<R>> extends TableReco
// [#673] [#3363] If store() is called after delete(), a new INSERT should
// be executed and the record should be recreated
finally {
changed(true);
touched(true);
fetched = false;
}
}

View File

@ -178,7 +178,7 @@ implements
@Override
public final UpdateImpl<R> set(Record record) {
return set(Tools.mapOfChangedValues(record));
return set(Tools.mapOfTouchedValues(record));
}

View File

@ -124,7 +124,7 @@ final class XMLHandler<R extends Record> extends DefaultHandler {
}
r.from(values);
r.changed(false);
r.touched(false);
return r;
}
}

View File

@ -257,7 +257,7 @@ public class LoggerListener implements ExecuteListener {
for (Parameter<?> param : routine.getOutParameters())
result.setValue((Field) fields.get(i++), routine.getValue(param));
result.changed(false);
result.touched(false);
}
return result;

View File

@ -25,7 +25,7 @@
<!-- These in-memory DBs are used by jOOQ-meta-extensions and a variety of integration tests -->
<h2.version>2.3.232</h2.version>
<sqlite.version>3.46.1.0</sqlite.version>
<duckdb.version>1.1.0</duckdb.version>
<duckdb.version>1.0.0</duckdb.version>
<derby.version>10.14.2.0</derby.version>
<hsqldb.version>2.7.2</hsqldb.version>