From d1b8fc11e135541437129d40cf6a39b349f82da2 Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Fri, 15 Mar 2024 14:02:06 +0100 Subject: [PATCH] [jOOQ/jOOQ#7539] Support for SQLDialect.CLICKHOUSE - WIP --- .../clickhouse/ClickHouseTableDefinition.java | 3 +- .../information_schema/tables/Columns.java | 52 +++++++------- .../tables/KeyColumnUsage.java | 24 +++---- .../information_schema/tables/Schemata.java | 14 ++-- .../information_schema/tables/Tables.java | 16 ++--- .../clickhouse/system/tables/Columns.java | 42 ++++++------ .../system/tables/DataSkippingIndices.java | 20 +++--- .../meta/clickhouse/system/tables/Tables.java | 68 +++++++++---------- .../main/java/org/jooq/impl/SQLDataTypes.java | 2 +- .../java/org/jooq/impl/Transformations.java | 2 +- .../jooq/impl/WindowSpecificationImpl.java | 9 +-- 11 files changed, 124 insertions(+), 128 deletions(-) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/ClickHouseTableDefinition.java b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/ClickHouseTableDefinition.java index a868712036..6426cde8b7 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/ClickHouseTableDefinition.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/ClickHouseTableDefinition.java @@ -39,6 +39,7 @@ package org.jooq.meta.clickhouse; import static org.jooq.impl.DSL.inline; import static org.jooq.impl.DSL.lower; +import static org.jooq.impl.DSL.nullif; import static org.jooq.impl.DSL.regexpReplaceFirst; import static org.jooq.meta.clickhouse.information_schema.Tables.COLUMNS; import static org.jooq.meta.clickhouse.system.System.SYSTEM; @@ -85,7 +86,7 @@ public class ClickHouseTableDefinition extends AbstractTableDefinition { COLUMNS.NUMERIC_PRECISION, COLUMNS.NUMERIC_SCALE, COLUMNS.IS_NULLABLE, - COLUMNS.COLUMN_DEFAULT, + nullif(COLUMNS.COLUMN_DEFAULT, inline("")).as(COLUMNS.COLUMN_DEFAULT), SYSTEM.COLUMNS.COMMENT ) .from(COLUMNS) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Columns.java b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Columns.java index ccb963beb4..99b31a80e1 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Columns.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Columns.java @@ -49,135 +49,135 @@ public class Columns extends TableImpl { /** * The column information_schema.columns.table_catalog. */ - public final TableField TABLE_CATALOG = createField(DSL.name("table_catalog"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_CATALOG = createField(DSL.name("table_catalog"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.columns.table_schema. */ - public final TableField TABLE_SCHEMA = createField(DSL.name("table_schema"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_SCHEMA = createField(DSL.name("table_schema"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.columns.table_name. */ - public final TableField TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.columns.column_name. */ - public final TableField COLUMN_NAME = createField(DSL.name("column_name"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField COLUMN_NAME = createField(DSL.name("column_name"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.columns.ordinal_position. */ - public final TableField ORDINAL_POSITION = createField(DSL.name("ordinal_position"), SQLDataType.BIGINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField ORDINAL_POSITION = createField(DSL.name("ordinal_position"), SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column information_schema.columns.column_default. */ - public final TableField COLUMN_DEFAULT = createField(DSL.name("column_default"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField COLUMN_DEFAULT = createField(DSL.name("column_default"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.columns.is_nullable. */ - public final TableField IS_NULLABLE = createField(DSL.name("is_nullable"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField IS_NULLABLE = createField(DSL.name("is_nullable"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.columns.data_type. */ - public final TableField DATA_TYPE = createField(DSL.name("data_type"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DATA_TYPE = createField(DSL.name("data_type"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column * information_schema.columns.character_maximum_length. */ - public final TableField CHARACTER_MAXIMUM_LENGTH = createField(DSL.name("character_maximum_length"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField CHARACTER_MAXIMUM_LENGTH = createField(DSL.name("character_maximum_length"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column * information_schema.columns.character_octet_length. */ - public final TableField CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column information_schema.columns.numeric_precision. */ - public final TableField NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column * information_schema.columns.numeric_precision_radix. */ - public final TableField NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column information_schema.columns.numeric_scale. */ - public final TableField NUMERIC_SCALE = createField(DSL.name("numeric_scale"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField NUMERIC_SCALE = createField(DSL.name("numeric_scale"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column information_schema.columns.datetime_precision. */ - public final TableField DATETIME_PRECISION = createField(DSL.name("datetime_precision"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField DATETIME_PRECISION = createField(DSL.name("datetime_precision"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column information_schema.columns.character_set_catalog. */ - public final TableField CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.columns.character_set_schema. */ - public final TableField CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.columns.character_set_name. */ - public final TableField CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.columns.collation_catalog. */ - public final TableField COLLATION_CATALOG = createField(DSL.name("collation_catalog"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField COLLATION_CATALOG = createField(DSL.name("collation_catalog"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.columns.collation_schema. */ - public final TableField COLLATION_SCHEMA = createField(DSL.name("collation_schema"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField COLLATION_SCHEMA = createField(DSL.name("collation_schema"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.columns.collation_name. */ - public final TableField COLLATION_NAME = createField(DSL.name("collation_name"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField COLLATION_NAME = createField(DSL.name("collation_name"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.columns.domain_catalog. */ - public final TableField DOMAIN_CATALOG = createField(DSL.name("domain_catalog"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DOMAIN_CATALOG = createField(DSL.name("domain_catalog"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.columns.domain_schema. */ - public final TableField DOMAIN_SCHEMA = createField(DSL.name("domain_schema"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DOMAIN_SCHEMA = createField(DSL.name("domain_schema"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.columns.domain_name. */ - public final TableField DOMAIN_NAME = createField(DSL.name("domain_name"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DOMAIN_NAME = createField(DSL.name("domain_name"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.columns.extra. */ - public final TableField EXTRA = createField(DSL.name("extra"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField EXTRA = createField(DSL.name("extra"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.columns.column_comment. */ - public final TableField COLUMN_COMMENT = createField(DSL.name("column_comment"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField COLUMN_COMMENT = createField(DSL.name("column_comment"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.columns.column_type. */ - public final TableField COLUMN_TYPE = createField(DSL.name("column_type"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField COLUMN_TYPE = createField(DSL.name("column_type"), SQLDataType.VARCHAR.nullable(false), this, ""); private Columns(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/KeyColumnUsage.java b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/KeyColumnUsage.java index 95692f5841..2bc67299a2 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/KeyColumnUsage.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/KeyColumnUsage.java @@ -51,70 +51,70 @@ public class KeyColumnUsage extends TableImpl { * The column * information_schema.key_column_usage.constraint_catalog. */ - public final TableField CONSTRAINT_CATALOG = createField(DSL.name("constraint_catalog"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField CONSTRAINT_CATALOG = createField(DSL.name("constraint_catalog"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column * information_schema.key_column_usage.constraint_schema. */ - public final TableField CONSTRAINT_SCHEMA = createField(DSL.name("constraint_schema"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField CONSTRAINT_SCHEMA = createField(DSL.name("constraint_schema"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column * information_schema.key_column_usage.constraint_name. */ - public final TableField CONSTRAINT_NAME = createField(DSL.name("constraint_name"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField CONSTRAINT_NAME = createField(DSL.name("constraint_name"), SQLDataType.VARCHAR, this, ""); /** * The column * information_schema.key_column_usage.table_catalog. */ - public final TableField TABLE_CATALOG = createField(DSL.name("table_catalog"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_CATALOG = createField(DSL.name("table_catalog"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.key_column_usage.table_schema. */ - public final TableField TABLE_SCHEMA = createField(DSL.name("table_schema"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_SCHEMA = createField(DSL.name("table_schema"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.key_column_usage.table_name. */ - public final TableField TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.key_column_usage.column_name. */ - public final TableField COLUMN_NAME = createField(DSL.name("column_name"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField COLUMN_NAME = createField(DSL.name("column_name"), SQLDataType.VARCHAR, this, ""); /** * The column * information_schema.key_column_usage.ordinal_position. */ - public final TableField ORDINAL_POSITION = createField(DSL.name("ordinal_position"), SQLDataType.INTEGERUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.INTEGERUNSIGNED)), this, ""); + public final TableField ORDINAL_POSITION = createField(DSL.name("ordinal_position"), SQLDataType.INTEGERUNSIGNED.nullable(false), this, ""); /** * The column * information_schema.key_column_usage.position_in_unique_constraint. */ - public final TableField POSITION_IN_UNIQUE_CONSTRAINT = createField(DSL.name("position_in_unique_constraint"), SQLDataType.INTEGERUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.INTEGERUNSIGNED)), this, ""); + public final TableField POSITION_IN_UNIQUE_CONSTRAINT = createField(DSL.name("position_in_unique_constraint"), SQLDataType.INTEGERUNSIGNED, this, ""); /** * The column * information_schema.key_column_usage.referenced_table_schema. */ - public final TableField REFERENCED_TABLE_SCHEMA = createField(DSL.name("referenced_table_schema"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField REFERENCED_TABLE_SCHEMA = createField(DSL.name("referenced_table_schema"), SQLDataType.VARCHAR, this, ""); /** * The column * information_schema.key_column_usage.referenced_table_name. */ - public final TableField REFERENCED_TABLE_NAME = createField(DSL.name("referenced_table_name"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField REFERENCED_TABLE_NAME = createField(DSL.name("referenced_table_name"), SQLDataType.VARCHAR, this, ""); /** * The column * information_schema.key_column_usage.referenced_column_name. */ - public final TableField REFERENCED_COLUMN_NAME = createField(DSL.name("referenced_column_name"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField REFERENCED_COLUMN_NAME = createField(DSL.name("referenced_column_name"), SQLDataType.VARCHAR, this, ""); private KeyColumnUsage(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Schemata.java b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Schemata.java index 2de9f21678..418f84a85f 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Schemata.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Schemata.java @@ -46,40 +46,40 @@ public class Schemata extends TableImpl { /** * The column information_schema.schemata.catalog_name. */ - public final TableField CATALOG_NAME = createField(DSL.name("catalog_name"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField CATALOG_NAME = createField(DSL.name("catalog_name"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.schemata.schema_name. */ - public final TableField SCHEMA_NAME = createField(DSL.name("schema_name"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField SCHEMA_NAME = createField(DSL.name("schema_name"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.schemata.schema_owner. */ - public final TableField SCHEMA_OWNER = createField(DSL.name("schema_owner"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField SCHEMA_OWNER = createField(DSL.name("schema_owner"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column * information_schema.schemata.default_character_set_catalog. */ - public final TableField DEFAULT_CHARACTER_SET_CATALOG = createField(DSL.name("default_character_set_catalog"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DEFAULT_CHARACTER_SET_CATALOG = createField(DSL.name("default_character_set_catalog"), SQLDataType.VARCHAR, this, ""); /** * The column * information_schema.schemata.default_character_set_schema. */ - public final TableField DEFAULT_CHARACTER_SET_SCHEMA = createField(DSL.name("default_character_set_schema"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DEFAULT_CHARACTER_SET_SCHEMA = createField(DSL.name("default_character_set_schema"), SQLDataType.VARCHAR, this, ""); /** * The column * information_schema.schemata.default_character_set_name. */ - public final TableField DEFAULT_CHARACTER_SET_NAME = createField(DSL.name("default_character_set_name"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DEFAULT_CHARACTER_SET_NAME = createField(DSL.name("default_character_set_name"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.schemata.sql_path. */ - public final TableField SQL_PATH = createField(DSL.name("sql_path"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField SQL_PATH = createField(DSL.name("sql_path"), SQLDataType.VARCHAR, this, ""); private Schemata(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Tables.java b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Tables.java index c405c166c9..59e34a59da 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Tables.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/information_schema/tables/Tables.java @@ -50,42 +50,42 @@ public class Tables extends TableImpl { /** * The column information_schema.tables.table_catalog. */ - public final TableField TABLE_CATALOG = createField(DSL.name("table_catalog"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_CATALOG = createField(DSL.name("table_catalog"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.tables.table_schema. */ - public final TableField TABLE_SCHEMA = createField(DSL.name("table_schema"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_SCHEMA = createField(DSL.name("table_schema"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.tables.table_name. */ - public final TableField TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.tables.table_type. */ - public final TableField TABLE_TYPE = createField(DSL.name("table_type"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_TYPE = createField(DSL.name("table_type"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column information_schema.tables.table_rows. */ - public final TableField TABLE_ROWS = createField(DSL.name("table_rows"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField TABLE_ROWS = createField(DSL.name("table_rows"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column information_schema.tables.data_length. */ - public final TableField DATA_LENGTH = createField(DSL.name("data_length"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField DATA_LENGTH = createField(DSL.name("data_length"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column information_schema.tables.table_collation. */ - public final TableField TABLE_COLLATION = createField(DSL.name("table_collation"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_COLLATION = createField(DSL.name("table_collation"), SQLDataType.VARCHAR, this, ""); /** * The column information_schema.tables.table_comment. */ - public final TableField TABLE_COMMENT = createField(DSL.name("table_comment"), SQLDataType.CHAR.defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE_COMMENT = createField(DSL.name("table_comment"), SQLDataType.VARCHAR, this, ""); private Tables(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/Columns.java b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/Columns.java index d8b3096a61..8ad8dd4df2 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/Columns.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/Columns.java @@ -44,107 +44,107 @@ public class Columns extends TableImpl { /** * The column system.columns.database. */ - public final TableField DATABASE = createField(DSL.name("database"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DATABASE = createField(DSL.name("database"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.columns.table. */ - public final TableField TABLE = createField(DSL.name("table"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE = createField(DSL.name("table"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.columns.name. */ - public final TableField NAME = createField(DSL.name("name"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.columns.type. */ - public final TableField TYPE = createField(DSL.name("type"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TYPE = createField(DSL.name("type"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.columns.position. */ - public final TableField POSITION = createField(DSL.name("position"), SQLDataType.BIGINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField POSITION = createField(DSL.name("position"), SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column system.columns.default_kind. */ - public final TableField DEFAULT_KIND = createField(DSL.name("default_kind"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DEFAULT_KIND = createField(DSL.name("default_kind"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.columns.default_expression. */ - public final TableField DEFAULT_EXPRESSION = createField(DSL.name("default_expression"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DEFAULT_EXPRESSION = createField(DSL.name("default_expression"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.columns.data_compressed_bytes. */ - public final TableField DATA_COMPRESSED_BYTES = createField(DSL.name("data_compressed_bytes"), SQLDataType.BIGINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField DATA_COMPRESSED_BYTES = createField(DSL.name("data_compressed_bytes"), SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column system.columns.data_uncompressed_bytes. */ - public final TableField DATA_UNCOMPRESSED_BYTES = createField(DSL.name("data_uncompressed_bytes"), SQLDataType.BIGINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField DATA_UNCOMPRESSED_BYTES = createField(DSL.name("data_uncompressed_bytes"), SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column system.columns.marks_bytes. */ - public final TableField MARKS_BYTES = createField(DSL.name("marks_bytes"), SQLDataType.BIGINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField MARKS_BYTES = createField(DSL.name("marks_bytes"), SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column system.columns.comment. */ - public final TableField COMMENT = createField(DSL.name("comment"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField COMMENT = createField(DSL.name("comment"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.columns.is_in_partition_key. */ - public final TableField IS_IN_PARTITION_KEY = createField(DSL.name("is_in_partition_key"), SQLDataType.TINYINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.TINYINTUNSIGNED)), this, ""); + public final TableField IS_IN_PARTITION_KEY = createField(DSL.name("is_in_partition_key"), SQLDataType.TINYINTUNSIGNED.nullable(false), this, ""); /** * The column system.columns.is_in_sorting_key. */ - public final TableField IS_IN_SORTING_KEY = createField(DSL.name("is_in_sorting_key"), SQLDataType.TINYINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.TINYINTUNSIGNED)), this, ""); + public final TableField IS_IN_SORTING_KEY = createField(DSL.name("is_in_sorting_key"), SQLDataType.TINYINTUNSIGNED.nullable(false), this, ""); /** * The column system.columns.is_in_primary_key. */ - public final TableField IS_IN_PRIMARY_KEY = createField(DSL.name("is_in_primary_key"), SQLDataType.TINYINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.TINYINTUNSIGNED)), this, ""); + public final TableField IS_IN_PRIMARY_KEY = createField(DSL.name("is_in_primary_key"), SQLDataType.TINYINTUNSIGNED.nullable(false), this, ""); /** * The column system.columns.is_in_sampling_key. */ - public final TableField IS_IN_SAMPLING_KEY = createField(DSL.name("is_in_sampling_key"), SQLDataType.TINYINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.TINYINTUNSIGNED)), this, ""); + public final TableField IS_IN_SAMPLING_KEY = createField(DSL.name("is_in_sampling_key"), SQLDataType.TINYINTUNSIGNED.nullable(false), this, ""); /** * The column system.columns.compression_codec. */ - public final TableField COMPRESSION_CODEC = createField(DSL.name("compression_codec"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField COMPRESSION_CODEC = createField(DSL.name("compression_codec"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.columns.character_octet_length. */ - public final TableField CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column system.columns.numeric_precision. */ - public final TableField NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column system.columns.numeric_precision_radix. */ - public final TableField NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column system.columns.numeric_scale. */ - public final TableField NUMERIC_SCALE = createField(DSL.name("numeric_scale"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField NUMERIC_SCALE = createField(DSL.name("numeric_scale"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column system.columns.datetime_precision. */ - public final TableField DATETIME_PRECISION = createField(DSL.name("datetime_precision"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField DATETIME_PRECISION = createField(DSL.name("datetime_precision"), SQLDataType.BIGINTUNSIGNED, this, ""); private Columns(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/DataSkippingIndices.java b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/DataSkippingIndices.java index e38dcb4e73..20fdb33b85 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/DataSkippingIndices.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/DataSkippingIndices.java @@ -44,54 +44,54 @@ public class DataSkippingIndices extends TableImpl { /** * The column system.data_skipping_indices.database. */ - public final TableField DATABASE = createField(DSL.name("database"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField DATABASE = createField(DSL.name("database"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.data_skipping_indices.table. */ - public final TableField TABLE = createField(DSL.name("table"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TABLE = createField(DSL.name("table"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.data_skipping_indices.name. */ - public final TableField NAME = createField(DSL.name("name"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.data_skipping_indices.type. */ - public final TableField TYPE = createField(DSL.name("type"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TYPE = createField(DSL.name("type"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.data_skipping_indices.type_full. */ - public final TableField TYPE_FULL = createField(DSL.name("type_full"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField TYPE_FULL = createField(DSL.name("type_full"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.data_skipping_indices.expr. */ - public final TableField EXPR = createField(DSL.name("expr"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, ""); + public final TableField EXPR = createField(DSL.name("expr"), SQLDataType.VARCHAR.nullable(false), this, ""); /** * The column system.data_skipping_indices.granularity. */ - public final TableField GRANULARITY = createField(DSL.name("granularity"), SQLDataType.BIGINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField GRANULARITY = createField(DSL.name("granularity"), SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column * system.data_skipping_indices.data_compressed_bytes. */ - public final TableField DATA_COMPRESSED_BYTES = createField(DSL.name("data_compressed_bytes"), SQLDataType.BIGINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField DATA_COMPRESSED_BYTES = createField(DSL.name("data_compressed_bytes"), SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column * system.data_skipping_indices.data_uncompressed_bytes. */ - public final TableField DATA_UNCOMPRESSED_BYTES = createField(DSL.name("data_uncompressed_bytes"), SQLDataType.BIGINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField DATA_UNCOMPRESSED_BYTES = createField(DSL.name("data_uncompressed_bytes"), SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); /** * The column system.data_skipping_indices.marks. */ - public final TableField MARKS = createField(DSL.name("marks"), SQLDataType.BIGINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField MARKS = createField(DSL.name("marks"), SQLDataType.BIGINTUNSIGNED.nullable(false), this, ""); private DataSkippingIndices(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/Tables.java b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/Tables.java index 5c22387da4..50a33ba7d5 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/Tables.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/clickhouse/system/tables/Tables.java @@ -47,118 +47,118 @@ public class Tables extends TableImpl { * The column system.tables.database. The name of the database * the table is in. */ - public final TableField DATABASE = createField(DSL.name("database"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "The name of the database the table is in."); + public final TableField DATABASE = createField(DSL.name("database"), SQLDataType.VARCHAR.nullable(false), this, "The name of the database the table is in."); /** * The column system.tables.name. Table name. */ - public final TableField NAME = createField(DSL.name("name"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "Table name."); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.VARCHAR.nullable(false), this, "Table name."); /** * The column system.tables.uuid. Table uuid (Atomic database). */ - public final TableField UUID = createField(DSL.name("uuid"), SQLDataType.UUID.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.UUID)), this, "Table uuid (Atomic database)."); + public final TableField UUID = createField(DSL.name("uuid"), SQLDataType.UUID.nullable(false), this, "Table uuid (Atomic database)."); /** * The column system.tables.engine. Table engine name (without * parameters). */ - public final TableField ENGINE = createField(DSL.name("engine"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "Table engine name (without parameters)."); + public final TableField ENGINE = createField(DSL.name("engine"), SQLDataType.VARCHAR.nullable(false), this, "Table engine name (without parameters)."); /** * The column system.tables.is_temporary. Flag that indicates * whether the table is temporary. */ - public final TableField IS_TEMPORARY = createField(DSL.name("is_temporary"), SQLDataType.TINYINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.TINYINTUNSIGNED)), this, "Flag that indicates whether the table is temporary."); + public final TableField IS_TEMPORARY = createField(DSL.name("is_temporary"), SQLDataType.TINYINTUNSIGNED.nullable(false), this, "Flag that indicates whether the table is temporary."); /** * The column system.tables.data_paths. Paths to the table data * in the file systems. */ - public final TableField DATA_PATHS = createField(DSL.name("data_paths"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)).array(), this, "Paths to the table data in the file systems."); + public final TableField DATA_PATHS = createField(DSL.name("data_paths"), SQLDataType.VARCHAR.nullable(false).array(), this, "Paths to the table data in the file systems."); /** * The column system.tables.metadata_path. Path to the table * metadata in the file system. */ - public final TableField METADATA_PATH = createField(DSL.name("metadata_path"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "Path to the table metadata in the file system."); + public final TableField METADATA_PATH = createField(DSL.name("metadata_path"), SQLDataType.VARCHAR.nullable(false), this, "Path to the table metadata in the file system."); /** * The column system.tables.metadata_modification_time. Time of * latest modification of the table metadata. */ - public final TableField METADATA_MODIFICATION_TIME = createField(DSL.name("metadata_modification_time"), SQLDataType.TIMESTAMP(0).nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.TIMESTAMP)), this, "Time of latest modification of the table metadata."); + public final TableField METADATA_MODIFICATION_TIME = createField(DSL.name("metadata_modification_time"), SQLDataType.TIMESTAMP(0).nullable(false), this, "Time of latest modification of the table metadata."); /** * The column system.tables.metadata_version. Metadata version * for ReplicatedMergeTree table, 0 for non ReplicatedMergeTree table. */ - public final TableField METADATA_VERSION = createField(DSL.name("metadata_version"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.INTEGER)), this, "Metadata version for ReplicatedMergeTree table, 0 for non ReplicatedMergeTree table."); + public final TableField METADATA_VERSION = createField(DSL.name("metadata_version"), SQLDataType.INTEGER.nullable(false), this, "Metadata version for ReplicatedMergeTree table, 0 for non ReplicatedMergeTree table."); /** * The column system.tables.dependencies_database. Database * dependencies. */ - public final TableField DEPENDENCIES_DATABASE = createField(DSL.name("dependencies_database"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)).array(), this, "Database dependencies."); + public final TableField DEPENDENCIES_DATABASE = createField(DSL.name("dependencies_database"), SQLDataType.VARCHAR.nullable(false).array(), this, "Database dependencies."); /** * The column system.tables.dependencies_table. Table * dependencies (materialized views the current table). */ - public final TableField DEPENDENCIES_TABLE = createField(DSL.name("dependencies_table"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)).array(), this, "Table dependencies (materialized views the current table)."); + public final TableField DEPENDENCIES_TABLE = createField(DSL.name("dependencies_table"), SQLDataType.VARCHAR.nullable(false).array(), this, "Table dependencies (materialized views the current table)."); /** * The column system.tables.create_table_query. The query that * was used to create the table. */ - public final TableField CREATE_TABLE_QUERY = createField(DSL.name("create_table_query"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "The query that was used to create the table."); + public final TableField CREATE_TABLE_QUERY = createField(DSL.name("create_table_query"), SQLDataType.VARCHAR.nullable(false), this, "The query that was used to create the table."); /** * The column system.tables.engine_full. Parameters of the * table engine. */ - public final TableField ENGINE_FULL = createField(DSL.name("engine_full"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "Parameters of the table engine."); + public final TableField ENGINE_FULL = createField(DSL.name("engine_full"), SQLDataType.VARCHAR.nullable(false), this, "Parameters of the table engine."); /** * The column system.tables.as_select. SELECT query for view. */ - public final TableField AS_SELECT = createField(DSL.name("as_select"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "SELECT query for view."); + public final TableField AS_SELECT = createField(DSL.name("as_select"), SQLDataType.VARCHAR.nullable(false), this, "SELECT query for view."); /** * The column system.tables.partition_key. The partition key * expression specified in the table. */ - public final TableField PARTITION_KEY = createField(DSL.name("partition_key"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "The partition key expression specified in the table."); + public final TableField PARTITION_KEY = createField(DSL.name("partition_key"), SQLDataType.VARCHAR.nullable(false), this, "The partition key expression specified in the table."); /** * The column system.tables.sorting_key. The sorting key * expression specified in the table. */ - public final TableField SORTING_KEY = createField(DSL.name("sorting_key"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "The sorting key expression specified in the table."); + public final TableField SORTING_KEY = createField(DSL.name("sorting_key"), SQLDataType.VARCHAR.nullable(false), this, "The sorting key expression specified in the table."); /** * The column system.tables.primary_key. The primary key * expression specified in the table. */ - public final TableField PRIMARY_KEY = createField(DSL.name("primary_key"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "The primary key expression specified in the table."); + public final TableField PRIMARY_KEY = createField(DSL.name("primary_key"), SQLDataType.VARCHAR.nullable(false), this, "The primary key expression specified in the table."); /** * The column system.tables.sampling_key. The sampling key * expression specified in the table. */ - public final TableField SAMPLING_KEY = createField(DSL.name("sampling_key"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "The sampling key expression specified in the table."); + public final TableField SAMPLING_KEY = createField(DSL.name("sampling_key"), SQLDataType.VARCHAR.nullable(false), this, "The sampling key expression specified in the table."); /** * The column system.tables.storage_policy. The storage policy. */ - public final TableField STORAGE_POLICY = createField(DSL.name("storage_policy"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "The storage policy."); + public final TableField STORAGE_POLICY = createField(DSL.name("storage_policy"), SQLDataType.VARCHAR.nullable(false), this, "The storage policy."); /** * The column system.tables.total_rows. Total number of rows, * if it is possible to quickly determine exact number of rows in the table, * otherwise NULL (including underlying Buffer table). */ - public final TableField TOTAL_ROWS = createField(DSL.name("total_rows"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, "Total number of rows, if it is possible to quickly determine exact number of rows in the table, otherwise NULL (including underlying Buffer table)."); + public final TableField TOTAL_ROWS = createField(DSL.name("total_rows"), SQLDataType.BIGINTUNSIGNED, this, "Total number of rows, if it is possible to quickly determine exact number of rows in the table, otherwise NULL (including underlying Buffer table)."); /** * The column system.tables.total_bytes. Total number of bytes, @@ -168,7 +168,7 @@ public class Tables extends TableImpl { * (i.e. compressed). If the table stores data in memory, returns * approximated number of used bytes in memory. */ - public final TableField TOTAL_BYTES = createField(DSL.name("total_bytes"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, "Total number of bytes, if it is possible to quickly determine exact number of bytes for the table on storage, otherwise NULL (does not includes any underlying storage). If the table stores data on disk, returns used space on disk (i.e. compressed). If the table stores data in memory, returns approximated number of used bytes in memory."); + public final TableField TOTAL_BYTES = createField(DSL.name("total_bytes"), SQLDataType.BIGINTUNSIGNED, this, "Total number of bytes, if it is possible to quickly determine exact number of bytes for the table on storage, otherwise NULL (does not includes any underlying storage). If the table stores data on disk, returns used space on disk (i.e. compressed). If the table stores data in memory, returns approximated number of used bytes in memory."); /** * The column system.tables.total_bytes_uncompressed. Total @@ -176,77 +176,77 @@ public class Tables extends TableImpl { * exact number of bytes from the part checksums for the table on storage, * otherwise NULL (does not take underlying storage (if any) into account). */ - public final TableField TOTAL_BYTES_UNCOMPRESSED = createField(DSL.name("total_bytes_uncompressed"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, "Total number of uncompressed bytes, if it's possible to quickly determine the exact number of bytes from the part checksums for the table on storage, otherwise NULL (does not take underlying storage (if any) into account)."); + public final TableField TOTAL_BYTES_UNCOMPRESSED = createField(DSL.name("total_bytes_uncompressed"), SQLDataType.BIGINTUNSIGNED, this, "Total number of uncompressed bytes, if it's possible to quickly determine the exact number of bytes from the part checksums for the table on storage, otherwise NULL (does not take underlying storage (if any) into account)."); /** * The column system.tables.parts. */ - public final TableField PARTS = createField(DSL.name("parts"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField PARTS = createField(DSL.name("parts"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column system.tables.active_parts. */ - public final TableField ACTIVE_PARTS = createField(DSL.name("active_parts"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField ACTIVE_PARTS = createField(DSL.name("active_parts"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column system.tables.total_marks. */ - public final TableField TOTAL_MARKS = createField(DSL.name("total_marks"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, ""); + public final TableField TOTAL_MARKS = createField(DSL.name("total_marks"), SQLDataType.BIGINTUNSIGNED, this, ""); /** * The column system.tables.lifetime_rows. Total number of rows * INSERTed since server start (only for Buffer tables). */ - public final TableField LIFETIME_ROWS = createField(DSL.name("lifetime_rows"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, "Total number of rows INSERTed since server start (only for Buffer tables)."); + public final TableField LIFETIME_ROWS = createField(DSL.name("lifetime_rows"), SQLDataType.BIGINTUNSIGNED, this, "Total number of rows INSERTed since server start (only for Buffer tables)."); /** * The column system.tables.lifetime_bytes. Total number of * bytes INSERTed since server start (only for Buffer tables). */ - public final TableField LIFETIME_BYTES = createField(DSL.name("lifetime_bytes"), SQLDataType.BIGINTUNSIGNED.defaultValue(DSL.field(DSL.raw(""), SQLDataType.BIGINTUNSIGNED)), this, "Total number of bytes INSERTed since server start (only for Buffer tables)."); + public final TableField LIFETIME_BYTES = createField(DSL.name("lifetime_bytes"), SQLDataType.BIGINTUNSIGNED, this, "Total number of bytes INSERTed since server start (only for Buffer tables)."); /** * The column system.tables.comment. The comment for the table. */ - public final TableField COMMENT = createField(DSL.name("comment"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)), this, "The comment for the table."); + public final TableField COMMENT = createField(DSL.name("comment"), SQLDataType.VARCHAR.nullable(false), this, "The comment for the table."); /** * The column system.tables.has_own_data. Flag that indicates * whether the table itself stores some data on disk or only accesses some * other source. */ - public final TableField HAS_OWN_DATA = createField(DSL.name("has_own_data"), SQLDataType.TINYINTUNSIGNED.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.TINYINTUNSIGNED)), this, "Flag that indicates whether the table itself stores some data on disk or only accesses some other source."); + public final TableField HAS_OWN_DATA = createField(DSL.name("has_own_data"), SQLDataType.TINYINTUNSIGNED.nullable(false), this, "Flag that indicates whether the table itself stores some data on disk or only accesses some other source."); /** * The column system.tables.loading_dependencies_database. * Database loading dependencies (list of objects which should be loaded * before the current object). */ - public final TableField LOADING_DEPENDENCIES_DATABASE = createField(DSL.name("loading_dependencies_database"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)).array(), this, "Database loading dependencies (list of objects which should be loaded before the current object)."); + public final TableField LOADING_DEPENDENCIES_DATABASE = createField(DSL.name("loading_dependencies_database"), SQLDataType.VARCHAR.nullable(false).array(), this, "Database loading dependencies (list of objects which should be loaded before the current object)."); /** * The column system.tables.loading_dependencies_table. Table * loading dependencies (list of objects which should be loaded before the * current object). */ - public final TableField LOADING_DEPENDENCIES_TABLE = createField(DSL.name("loading_dependencies_table"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)).array(), this, "Table loading dependencies (list of objects which should be loaded before the current object)."); + public final TableField LOADING_DEPENDENCIES_TABLE = createField(DSL.name("loading_dependencies_table"), SQLDataType.VARCHAR.nullable(false).array(), this, "Table loading dependencies (list of objects which should be loaded before the current object)."); /** * The column system.tables.loading_dependent_database. * Dependent loading database. */ - public final TableField LOADING_DEPENDENT_DATABASE = createField(DSL.name("loading_dependent_database"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)).array(), this, "Dependent loading database."); + public final TableField LOADING_DEPENDENT_DATABASE = createField(DSL.name("loading_dependent_database"), SQLDataType.VARCHAR.nullable(false).array(), this, "Dependent loading database."); /** * The column system.tables.loading_dependent_table. Dependent * loading table. */ - public final TableField LOADING_DEPENDENT_TABLE = createField(DSL.name("loading_dependent_table"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw(""), SQLDataType.CHAR)).array(), this, "Dependent loading table."); + public final TableField LOADING_DEPENDENT_TABLE = createField(DSL.name("loading_dependent_table"), SQLDataType.VARCHAR.nullable(false).array(), this, "Dependent loading table."); /** * The column system.tables.table. */ - public final TableField TABLE = createField(DSL.name("table"), SQLDataType.CHAR.nullable(false).defaultValue(DSL.field(DSL.raw("name"), SQLDataType.CHAR)), this, ""); + public final TableField TABLE = createField(DSL.name("table"), SQLDataType.VARCHAR.nullable(false).defaultValue(DSL.field(DSL.raw("name"), SQLDataType.VARCHAR)), this, ""); private Tables(Name alias, Table aliased) { this(alias, aliased, (Field[]) null, null); diff --git a/jOOQ/src/main/java/org/jooq/impl/SQLDataTypes.java b/jOOQ/src/main/java/org/jooq/impl/SQLDataTypes.java index 415458fa47..5c3e77a82e 100644 --- a/jOOQ/src/main/java/org/jooq/impl/SQLDataTypes.java +++ b/jOOQ/src/main/java/org/jooq/impl/SQLDataTypes.java @@ -102,9 +102,9 @@ final class SQLDataTypes { static final DataType DECIMAL64 = new BuiltInDataType<>(FAMILY, SQLDataType.DECIMAL, "Decimal64(s)"); static final DataType DECIMAL128 = new BuiltInDataType<>(FAMILY, SQLDataType.DECIMAL, "Decimal128(s)"); static final DataType DECIMAL256 = new BuiltInDataType<>(FAMILY, SQLDataType.DECIMAL, "Decimal256(s)"); + static final DataType STRING = new BuiltInDataType<>(FAMILY, SQLDataType.VARCHAR, "String"); static final DataType VARCHAR = new BuiltInDataType<>(FAMILY, SQLDataType.VARCHAR, "varchar(l)"); static final DataType CHAR = new BuiltInDataType<>(FAMILY, SQLDataType.CHAR, "char(l)"); - static final DataType STRING = new BuiltInDataType<>(FAMILY, SQLDataType.CHAR, "String"); static final DataType DATE = new BuiltInDataType<>(FAMILY, SQLDataType.DATE, "date"); static final DataType DATE32 = new BuiltInDataType<>(FAMILY, SQLDataType.DATE, "Date32"); static final DataType