[jOOQ/jOOQ#12052] Add DuckDB support

- Remove stored procedures / functions from tests for now
- Drop indexes explicitly, see
https://github.com/duckdb/duckdb/issues/6737
- Skip T_SPATIAL creation
- No STORED computed columns supported yet
- No constraints on computed columns supported yet
- Work around https://github.com/duckdb/duckdb/issues/7168
- Never fully qualify fields
- Generate jOOQ-meta classes
- Generate integration test classes
- Native * EXCLUDE support
This commit is contained in:
Lukas Eder 2023-04-21 15:01:08 +02:00
parent e16a82371e
commit 52a5abc79d
24 changed files with 3037 additions and 350 deletions

View File

@ -64,6 +64,7 @@ import java.io.StringReader;
import java.math.BigInteger;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.AbstractMap.SimpleImmutableEntry;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@ -75,6 +76,7 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Optional;
import java.util.Properties;
import java.util.Set;
@ -140,6 +142,8 @@ import org.jooq.tools.StringUtils;
import org.jooq.tools.csv.CSVReader;
import org.jooq.tools.jdbc.JDBCUtils;
import org.jetbrains.annotations.ApiStatus.Internal;
/**
* A base implementation for all types of databases.
*
@ -809,6 +813,17 @@ public abstract class AbstractDatabase implements Database {
return null;
}
@Internal
protected List<Entry<String, String>> getInputCatalogsAndSchemata() {
List<Entry<String, String>> result = new ArrayList<>();
for (String catalog : getInputCatalogs())
for (String schema : getInputSchemata(catalog))
result.add(new SimpleImmutableEntry<>(catalog, schema));
return result;
}
@Override
public final List<String> getInputCatalogs() {
if (inputCatalogs == null) {

View File

@ -38,68 +38,46 @@
package org.jooq.meta.duckdb;
import static java.util.stream.Collectors.toList;
import static org.jooq.Records.mapping;
import static org.jooq.impl.DSL.decode;
import static org.jooq.impl.DSL.falseCondition;
import static org.jooq.impl.DSL.field;
import static org.jooq.impl.DSL.inline;
import static org.jooq.impl.DSL.name;
import static org.jooq.impl.DSL.noCondition;
import static org.jooq.impl.DSL.nvl;
import static org.jooq.impl.DSL.row;
import static org.jooq.impl.DSL.select;
import static org.jooq.impl.DSL.when;
import static org.jooq.impl.SQLDataType.BIGINT;
import static org.jooq.impl.SQLDataType.BOOLEAN;
import static org.jooq.impl.SQLDataType.INTEGER;
import static org.jooq.impl.SQLDataType.NUMERIC;
import static org.jooq.impl.SQLDataType.VARCHAR;
import static org.jooq.meta.hsqldb.information_schema.Tables.CHECK_CONSTRAINTS;
import static org.jooq.meta.hsqldb.information_schema.Tables.COLUMNS;
import static org.jooq.meta.hsqldb.information_schema.Tables.DOMAIN_CONSTRAINTS;
import static org.jooq.meta.hsqldb.information_schema.Tables.ELEMENT_TYPES;
import static org.jooq.meta.hsqldb.information_schema.Tables.KEY_COLUMN_USAGE;
import static org.jooq.meta.hsqldb.information_schema.Tables.REFERENTIAL_CONSTRAINTS;
import static org.jooq.meta.hsqldb.information_schema.Tables.ROUTINES;
import static org.jooq.meta.hsqldb.information_schema.Tables.SCHEMATA;
import static org.jooq.meta.hsqldb.information_schema.Tables.SEQUENCES;
import static org.jooq.meta.hsqldb.information_schema.Tables.SYSTEM_INDEXINFO;
import static org.jooq.meta.hsqldb.information_schema.Tables.SYSTEM_TABLES;
import static org.jooq.meta.hsqldb.information_schema.Tables.TABLE_CONSTRAINTS;
import static org.jooq.meta.hsqldb.information_schema.Tables.VIEWS;
import static org.jooq.meta.duckdb.system.main.Tables.DUCKDB_CONSTRAINTS;
import static org.jooq.meta.duckdb.system.main.Tables.DUCKDB_DATABASES;
import static org.jooq.meta.duckdb.system.main.Tables.DUCKDB_SCHEMAS;
import static org.jooq.meta.duckdb.system.main.Tables.DUCKDB_TABLES;
import static org.jooq.meta.duckdb.system.main.Tables.DUCKDB_VIEWS;
import java.math.BigDecimal;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.jooq.DSLContext;
import org.jooq.Field;
import org.jooq.Record;
import org.jooq.Record12;
import org.jooq.Record4;
import org.jooq.Record6;
import org.jooq.Result;
import org.jooq.ResultQuery;
import org.jooq.SQLDialect;
import org.jooq.SortOrder;
import org.jooq.TableOptions.TableType;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.meta.AbstractDatabase;
import org.jooq.meta.AbstractIndexDefinition;
import org.jooq.meta.ArrayDefinition;
import org.jooq.meta.CatalogDefinition;
import org.jooq.meta.DataTypeDefinition;
import org.jooq.meta.DefaultCheckConstraintDefinition;
import org.jooq.meta.DefaultDataTypeDefinition;
import org.jooq.meta.DefaultDomainDefinition;
import org.jooq.meta.DefaultIndexColumnDefinition;
import org.jooq.meta.DefaultRelations;
import org.jooq.meta.DefaultSequenceDefinition;
import org.jooq.meta.DomainDefinition;
import org.jooq.meta.EnumDefinition;
import org.jooq.meta.IndexColumnDefinition;
import org.jooq.meta.IndexDefinition;
import org.jooq.meta.PackageDefinition;
import org.jooq.meta.ResultQueryDatabase;
@ -109,15 +87,6 @@ import org.jooq.meta.SequenceDefinition;
import org.jooq.meta.TableDefinition;
import org.jooq.meta.UDTDefinition;
import org.jooq.meta.XMLSchemaCollectionDefinition;
import org.jooq.meta.hsqldb.HSQLDBRoutineDefinition;
import org.jooq.meta.hsqldb.HSQLDBTableDefinition;
import org.jooq.meta.hsqldb.HSQLDBTableValuedFunction;
import org.jooq.meta.hsqldb.information_schema.tables.CheckConstraints;
import org.jooq.meta.hsqldb.information_schema.tables.Columns;
import org.jooq.meta.hsqldb.information_schema.tables.DomainConstraints;
import org.jooq.meta.hsqldb.information_schema.tables.KeyColumnUsage;
import org.jooq.tools.JooqLogger;
import org.jooq.tools.StringUtils;
/**
* The DuckDB database
@ -140,28 +109,36 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
@Override
protected void loadPrimaryKeys(DefaultRelations relations) throws SQLException {
for (Record record : primaryKeys(getInputSchemata())) {
SchemaDefinition schema = getSchema(record.get(KEY_COLUMN_USAGE.TABLE_SCHEMA));
String key = record.get(KEY_COLUMN_USAGE.CONSTRAINT_NAME);
String tableName = record.get(KEY_COLUMN_USAGE.TABLE_NAME);
String columnName = record.get(KEY_COLUMN_USAGE.COLUMN_NAME);
CatalogDefinition catalog = getCatalog(record.get(DUCKDB_CONSTRAINTS.DATABASE_NAME));
TableDefinition table = getTable(schema, tableName);
if (table != null)
relations.addPrimaryKey(key, table, table.getColumn(columnName));
if (catalog != null) {
SchemaDefinition schema = catalog.getSchema(record.get(DUCKDB_CONSTRAINTS.SCHEMA_NAME));
String key = record.get(DUCKDB_CONSTRAINTS.CONSTRAINT_TEXT);
String tableName = record.get(DUCKDB_CONSTRAINTS.TABLE_NAME);
String columnName = record.get(DUCKDB_CONSTRAINTS.CONSTRAINT_COLUMN_NAMES, String.class);
TableDefinition table = getTable(schema, tableName);
if (table != null)
relations.addPrimaryKey(key, table, table.getColumn(columnName));
}
}
}
@Override
protected void loadUniqueKeys(DefaultRelations relations) throws SQLException {
for (Record record : uniqueKeys(getInputSchemata())) {
SchemaDefinition schema = getSchema(record.get(KEY_COLUMN_USAGE.TABLE_SCHEMA));
String key = record.get(KEY_COLUMN_USAGE.CONSTRAINT_NAME);
String tableName = record.get(KEY_COLUMN_USAGE.TABLE_NAME);
String columnName = record.get(KEY_COLUMN_USAGE.COLUMN_NAME);
CatalogDefinition catalog = getCatalog(record.get(DUCKDB_CONSTRAINTS.DATABASE_NAME));
TableDefinition table = getTable(schema, tableName);
if (table != null)
relations.addUniqueKey(key, table, table.getColumn(columnName));
if (catalog != null) {
SchemaDefinition schema = catalog.getSchema(record.get(DUCKDB_CONSTRAINTS.SCHEMA_NAME));
String key = record.get(DUCKDB_CONSTRAINTS.CONSTRAINT_TEXT);
String tableName = record.get(DUCKDB_CONSTRAINTS.TABLE_NAME);
String columnName = record.get(DUCKDB_CONSTRAINTS.CONSTRAINT_COLUMN_NAMES, String.class);
TableDefinition table = getTable(schema, tableName);
if (table != null)
relations.addUniqueKey(key, table, table.getColumn(columnName));
}
}
}
@ -178,182 +155,100 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
private ResultQuery<Record6<String, String, String, String, String, Integer>> keys(List<String> schemas, String constraintType) {
return create()
.select(
KEY_COLUMN_USAGE.TABLE_CATALOG,
KEY_COLUMN_USAGE.TABLE_SCHEMA,
KEY_COLUMN_USAGE.TABLE_NAME,
KEY_COLUMN_USAGE.CONSTRAINT_NAME,
KEY_COLUMN_USAGE.COLUMN_NAME,
KEY_COLUMN_USAGE.ORDINAL_POSITION.coerce(INTEGER))
.from(KEY_COLUMN_USAGE)
.where(KEY_COLUMN_USAGE.tableConstraints().CONSTRAINT_TYPE.eq(inline(constraintType)))
.and(KEY_COLUMN_USAGE.tableConstraints().TABLE_SCHEMA.in(schemas))
.orderBy(
KEY_COLUMN_USAGE.TABLE_SCHEMA.asc(),
KEY_COLUMN_USAGE.TABLE_NAME.asc(),
KEY_COLUMN_USAGE.CONSTRAINT_NAME.asc(),
KEY_COLUMN_USAGE.ORDINAL_POSITION.asc());
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),
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)
)
.from("{0}()", DUCKDB_CONSTRAINTS)
.where(DUCKDB_CONSTRAINTS.CONSTRAINT_TYPE.eq(inline(constraintType)))
// TODO: Query (catalog, schema), instead
.and(DUCKDB_CONSTRAINTS.SCHEMA_NAME.in(schemas));
}
@Override
protected void loadForeignKeys(DefaultRelations relations) throws SQLException {
KeyColumnUsage fkKcu = KEY_COLUMN_USAGE.as("fk_kcu");
KeyColumnUsage pkKcu = KEY_COLUMN_USAGE.as("pk_kcu");
Result<?> result = create()
.select(
REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_NAME,
REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_SCHEMA,
TABLE_CONSTRAINTS.TABLE_NAME,
fkKcu.CONSTRAINT_NAME,
fkKcu.TABLE_SCHEMA,
fkKcu.TABLE_NAME,
fkKcu.COLUMN_NAME,
pkKcu.COLUMN_NAME
)
.from(REFERENTIAL_CONSTRAINTS)
.join(fkKcu)
.on(fkKcu.CONSTRAINT_SCHEMA.equal(REFERENTIAL_CONSTRAINTS.CONSTRAINT_SCHEMA))
.and(fkKcu.CONSTRAINT_NAME.equal(REFERENTIAL_CONSTRAINTS.CONSTRAINT_NAME))
.join(TABLE_CONSTRAINTS)
.on(TABLE_CONSTRAINTS.CONSTRAINT_SCHEMA.eq(REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_SCHEMA))
.and(TABLE_CONSTRAINTS.CONSTRAINT_NAME.eq(REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_NAME))
.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))
.where(fkKcu.TABLE_SCHEMA.in(getInputSchemata()))
.orderBy(
fkKcu.TABLE_SCHEMA.asc(),
fkKcu.TABLE_NAME.asc(),
fkKcu.CONSTRAINT_NAME.asc(),
fkKcu.ORDINAL_POSITION.asc())
.fetch();
for (Record record : result) {
SchemaDefinition foreignKeySchema = getSchema(record.get(fkKcu.TABLE_SCHEMA));
SchemaDefinition uniqueKeySchema = getSchema(record.get(REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_SCHEMA));
String foreignKey = record.get(fkKcu.CONSTRAINT_NAME);
String foreignKeyTableName = record.get(fkKcu.TABLE_NAME);
String foreignKeyColumn = record.get(fkKcu.COLUMN_NAME);
String uniqueKey = record.get(REFERENTIAL_CONSTRAINTS.UNIQUE_CONSTRAINT_NAME);
String uniqueKeyTableName = record.get(TABLE_CONSTRAINTS.TABLE_NAME);
String uniqueKeyColumn = record.get(pkKcu.COLUMN_NAME);
TableDefinition foreignKeyTable = getTable(foreignKeySchema, foreignKeyTableName);
TableDefinition uniqueKeyTable = getTable(uniqueKeySchema, uniqueKeyTableName);
if (foreignKeyTable != null && uniqueKeyTable != null)
relations.addForeignKey(
foreignKey,
foreignKeyTable,
foreignKeyTable.getColumn(foreignKeyColumn),
uniqueKey,
uniqueKeyTable,
uniqueKeyTable.getColumn(uniqueKeyColumn),
true
);
}
}
@Override
protected void loadCheckConstraints(DefaultRelations relations) throws SQLException {
CheckConstraints cc = CHECK_CONSTRAINTS.as("cc");
Columns c = COLUMNS.as("c");
// [#2808] [#3019] Workaround for bad handling of JOIN .. USING
Field<String> constraintName = field(name(cc.CONSTRAINT_NAME.getName()), String.class);
for (Record record : create()
.select(
cc.tableConstraints().TABLE_SCHEMA,
cc.tableConstraints().TABLE_NAME,
constraintName,
cc.CHECK_CLAUSE
)
.from(cc)
.where(cc.tableConstraints().TABLE_SCHEMA.in(getInputSchemata()))
.and(getIncludeSystemCheckConstraints()
? noCondition()
: cc.tableConstraints().CONSTRAINT_NAME.notLike("SYS!_CT!_%", '!')
.or(cc.CHECK_CLAUSE.notIn(
// TODO: Should we ever quote these?
select(c.TABLE_SCHEMA.concat(inline('.'))
.concat(c.TABLE_NAME).concat(inline('.'))
.concat(c.COLUMN_NAME).concat(inline(" IS NOT NULL")))
.from(c)
.where(c.TABLE_SCHEMA.eq(cc.tableConstraints().TABLE_SCHEMA))
.and(c.TABLE_NAME.eq(cc.tableConstraints().TABLE_NAME))
)))
) {
SchemaDefinition schema = getSchema(record.get(cc.tableConstraints().TABLE_SCHEMA));
TableDefinition table = getTable(schema, record.get(cc.tableConstraints().TABLE_NAME));
if (table != null) {
relations.addCheckConstraint(table, new DefaultCheckConstraintDefinition(
schema,
table,
record.get(constraintName),
record.get(cc.CHECK_CLAUSE)
));
}
}
}
@Override
protected List<CatalogDefinition> getCatalogs0() throws SQLException {
List<CatalogDefinition> result = new ArrayList<>();
result.add(new CatalogDefinition(this, "", ""));
return result;
return
create().select(DUCKDB_DATABASES.DATABASE_NAME)
.from("{0}()", DUCKDB_DATABASES)
.fetch(mapping(c -> new CatalogDefinition(this, c, "")));
}
@Override
protected List<SchemaDefinition> getSchemata0() throws SQLException {
return
create().select(SCHEMATA.SCHEMA_NAME)
.from(SCHEMATA)
.fetch(mapping(s -> new SchemaDefinition(this, s, "")));
create().select(DUCKDB_SCHEMAS.DATABASE_NAME, DUCKDB_SCHEMAS.SCHEMA_NAME)
.from("{0}()", DUCKDB_SCHEMAS)
.where(DUCKDB_SCHEMAS.DATABASE_NAME.in(getInputCatalogs()))
.fetch(mapping((c, s) -> new SchemaDefinition(this, s, "", getCatalog(c))));
}
@Override
public ResultQuery<Record4<String, String, String, String>> sources(List<String> schemas) {
return create()
.select(
VIEWS.TABLE_CATALOG,
VIEWS.TABLE_SCHEMA,
VIEWS.TABLE_NAME,
VIEWS.VIEW_DEFINITION)
.from(VIEWS)
.where(VIEWS.TABLE_SCHEMA.in(schemas))
.orderBy(
VIEWS.TABLE_SCHEMA,
VIEWS.TABLE_NAME)
;
DUCKDB_VIEWS.DATABASE_NAME,
DUCKDB_VIEWS.SCHEMA_NAME,
DUCKDB_VIEWS.VIEW_NAME,
DUCKDB_VIEWS.SQL)
.from("{0}()", DUCKDB_VIEWS)
.where(DUCKDB_VIEWS.SCHEMA_NAME.in(schemas));
}
@Override
public ResultQuery<Record12<String, String, String, String, Integer, Integer, Long, Long, BigDecimal, BigDecimal, Boolean, Long>> sequences(List<String> schemas) {
return create()
.select(
inline(null, VARCHAR).as("catalog"),
SEQUENCES.SEQUENCE_SCHEMA,
SEQUENCES.SEQUENCE_NAME,
SEQUENCES.DATA_TYPE,
SEQUENCES.NUMERIC_PRECISION.coerce(INTEGER),
SEQUENCES.NUMERIC_SCALE.coerce(INTEGER),
SEQUENCES.START_WITH.coerce(BIGINT),
SEQUENCES.INCREMENT.coerce(BIGINT),
SEQUENCES.MINIMUM_VALUE.coerce(NUMERIC),
SEQUENCES.MAXIMUM_VALUE.coerce(NUMERIC),
decode(SEQUENCES.CYCLE_OPTION, inline("YES"), inline(true), inline(false)).as(SEQUENCES.CYCLE_OPTION),
inline(null, BIGINT).as("cache"))
.from(SEQUENCES)
.where(SEQUENCES.SEQUENCE_SCHEMA.in(schemas))
.orderBy(
SEQUENCES.SEQUENCE_SCHEMA,
SEQUENCES.SEQUENCE_NAME);
.resultQuery(
"""
select
database_name,
schema_name,
sequence_name,
'bigint' as data_type,
0 as precision,
0 as scale,
start_value,
increment_by,
min_value,
max_value,
cycle,
0 as cache
from duckdb_sequences()
where sequence_name in ({0})
""",
DSL.list(schemas.stream().map(DSL::val).collect(toList()))
)
.coerce(
field("database_name", VARCHAR),
field("schema_name", VARCHAR),
field("sequence_name", VARCHAR),
field("data_type", VARCHAR),
field("precision", INTEGER),
field("scale", INTEGER),
field("start_value", BIGINT),
field("increment_by", BIGINT),
field("min_value", NUMERIC),
field("max_value", NUMERIC),
field("cycle", BOOLEAN),
field("cache", BIGINT)
);
}
@Override
@ -361,16 +256,22 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
List<SequenceDefinition> result = new ArrayList<>();
for (Record record : sequences(getInputSchemata())) {
SchemaDefinition schema = getSchema(record.get(SEQUENCES.SEQUENCE_SCHEMA));
CatalogDefinition catalog = getCatalog(record.get("database_name", String.class));
DataTypeDefinition type = new DefaultDataTypeDefinition(
this,
schema,
record.get(SEQUENCES.DATA_TYPE)
);
if (catalog != null) {
SchemaDefinition schema = getSchema(record.get("schema_name", String.class));
result.add(new DefaultSequenceDefinition(
schema, record.get(SEQUENCES.SEQUENCE_NAME), type));
if (schema != null) {
DataTypeDefinition type = new DefaultDataTypeDefinition(
this,
schema,
"BIGINT"
);
result.add(new DefaultSequenceDefinition(
schema, record.get("sequence_name", String.class), type));
}
}
}
return result;
@ -381,52 +282,35 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
List<TableDefinition> result = new ArrayList<>();
for (Record record : create()
.select(
SYSTEM_TABLES.TABLE_SCHEM,
SYSTEM_TABLES.TABLE_NAME,
inline("").as(ROUTINES.SPECIFIC_NAME),
SYSTEM_TABLES.REMARKS,
when(SYSTEM_TABLES.TABLE_TYPE.eq(inline("VIEW")), inline(TableType.VIEW.name()))
.else_(inline(TableType.TABLE.name())).trim().as("table_type"),
when(VIEWS.VIEW_DEFINITION.lower().like(inline("create%")), VIEWS.VIEW_DEFINITION)
.else_(inline("create view \"").concat(SYSTEM_TABLES.TABLE_NAME).concat("\" as ").concat(VIEWS.VIEW_DEFINITION)).as(VIEWS.VIEW_DEFINITION)
.select(
DUCKDB_TABLES.DATABASE_NAME,
DUCKDB_TABLES.SCHEMA_NAME,
DUCKDB_TABLES.TABLE_NAME,
inline(TableType.TABLE.name()).as("table_type")
)
.from("{0}()", DUCKDB_TABLES)
.where(row(DUCKDB_TABLES.DATABASE_NAME, DUCKDB_TABLES.SCHEMA_NAME).in(
getInputCatalogsAndSchemata().stream().map(e -> row(e.getKey(), e.getValue())).collect(toList())
))
.unionAll(
select(
DUCKDB_VIEWS.DATABASE_NAME,
DUCKDB_VIEWS.SCHEMA_NAME,
DUCKDB_VIEWS.VIEW_NAME,
inline(TableType.VIEW.name()).as("table_type")
)
.from(SYSTEM_TABLES)
.leftJoin(VIEWS)
.on(SYSTEM_TABLES.TABLE_SCHEM.eq(VIEWS.TABLE_SCHEMA))
.and(SYSTEM_TABLES.TABLE_NAME.eq(VIEWS.TABLE_NAME))
.where(SYSTEM_TABLES.TABLE_SCHEM.in(getInputSchemata()))
.unionAll(tableValuedFunctions()
? select(
ROUTINES.ROUTINE_SCHEMA,
ROUTINES.ROUTINE_NAME,
ROUTINES.SPECIFIC_NAME,
inline(""),
inline(TableType.FUNCTION.name()),
ROUTINES.ROUTINE_DEFINITION)
.from(ROUTINES)
.where(ROUTINES.ROUTINE_SCHEMA.in(getInputSchemata()))
.and(ROUTINES.ROUTINE_TYPE.eq(inline("FUNCTION")))
.and(ROUTINES.DATA_TYPE.startsWith(inline("ROW(")))
: select(inline(""), inline(""), inline(""), inline(""), inline(TableType.FUNCTION.name()), inline(""))
.where(falseCondition())
)
.orderBy(
SYSTEM_TABLES.TABLE_SCHEM,
SYSTEM_TABLES.TABLE_NAME).fetch()) {
SchemaDefinition schema = getSchema(record.get(SYSTEM_TABLES.TABLE_SCHEM));
String name = record.get(SYSTEM_TABLES.TABLE_NAME);
String specificName = record.get(ROUTINES.SPECIFIC_NAME);
String comment = record.get(SYSTEM_TABLES.REMARKS);
.from("{0}()", DUCKDB_VIEWS)
.where(row(DUCKDB_VIEWS.DATABASE_NAME, DUCKDB_VIEWS.SCHEMA_NAME).in(
getInputCatalogsAndSchemata().stream().map(e -> row(e.getKey(), e.getValue())).collect(toList())
))
)
.orderBy(1, 2, 3)
) {
CatalogDefinition catalog = getCatalog(record.get(DUCKDB_TABLES.DATABASE_NAME));
SchemaDefinition schema = catalog.getSchema(record.get(DUCKDB_TABLES.SCHEMA_NAME));
String name = record.get(DUCKDB_TABLES.TABLE_NAME);
TableType tableType = record.get("table_type", TableType.class);
String source = record.get(VIEWS.VIEW_DEFINITION);
if (tableType == TableType.FUNCTION)
result.add(new HSQLDBTableValuedFunction(schema, name, specificName, comment, source));
else
result.add(new HSQLDBTableDefinition(schema, name, comment, tableType, source));
result.add(new DuckDBTableDefinition(schema, name, "", tableType, null));
}
return result;
@ -441,48 +325,6 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
@Override
protected List<DomainDefinition> getDomains0() throws SQLException {
List<DomainDefinition> result = new ArrayList<>();
DomainConstraints dc = DOMAIN_CONSTRAINTS.as("dc");
for (Record record : create()
.select(
dc.domains().DOMAIN_SCHEMA,
dc.domains().DOMAIN_NAME,
dc.domains().DATA_TYPE,
dc.domains().CHARACTER_MAXIMUM_LENGTH,
dc.domains().NUMERIC_PRECISION,
dc.domains().NUMERIC_SCALE,
dc.domains().DOMAIN_DEFAULT,
dc.checkConstraints().CHECK_CLAUSE)
.from(dc)
.where(dc.domains().DOMAIN_SCHEMA.in(getInputSchemata()))
.orderBy(dc.domains().DOMAIN_SCHEMA, dc.domains().DOMAIN_NAME)
) {
SchemaDefinition schema = getSchema(record.get(dc.domains().DOMAIN_SCHEMA));
DataTypeDefinition baseType = new DefaultDataTypeDefinition(
this,
schema,
record.get(dc.domains().DATA_TYPE),
record.get(dc.domains().CHARACTER_MAXIMUM_LENGTH),
record.get(dc.domains().NUMERIC_PRECISION),
record.get(dc.domains().NUMERIC_SCALE),
true,
record.get(dc.domains().DOMAIN_DEFAULT)
);
DefaultDomainDefinition domain = new DefaultDomainDefinition(
schema,
record.get(dc.domains().DOMAIN_NAME),
baseType
);
if (!StringUtils.isBlank(record.get(dc.checkConstraints().CHECK_CLAUSE)))
domain.addCheckClause(record.get(dc.checkConstraints().CHECK_CLAUSE));
result.add(domain);
}
return result;
}
@ -507,48 +349,6 @@ public class DuckDBDatabase extends AbstractDatabase implements ResultQueryDatab
@Override
protected List<RoutineDefinition> getRoutines0() throws SQLException {
List<RoutineDefinition> result = new ArrayList<>();
for (Record record : create()
.select(
ROUTINES.ROUTINE_SCHEMA,
ROUTINES.ROUTINE_NAME,
ROUTINES.SPECIFIC_NAME,
nvl(ELEMENT_TYPES.COLLECTION_TYPE_IDENTIFIER, ROUTINES.DATA_TYPE).as("datatype"),
ROUTINES.NUMERIC_PRECISION,
ROUTINES.NUMERIC_SCALE,
ROUTINES.ROUTINE_DEFINITION.likeRegex(".*(?i:(\\w+\\s+)+aggregate\\s+function).*").as("aggregate"))
.from(ROUTINES)
.leftOuterJoin(ELEMENT_TYPES)
.on(ROUTINES.ROUTINE_SCHEMA.equal(ELEMENT_TYPES.OBJECT_SCHEMA))
.and(ROUTINES.ROUTINE_NAME.equal(ELEMENT_TYPES.OBJECT_NAME))
.and(ROUTINES.DTD_IDENTIFIER.equal(ELEMENT_TYPES.COLLECTION_TYPE_IDENTIFIER))
.where(ROUTINES.ROUTINE_SCHEMA.in(getInputSchemata()))
.and(tableValuedFunctions()
? ROUTINES.DATA_TYPE.isNull().or(ROUTINES.DATA_TYPE.notLike(inline("ROW(%")))
: noCondition())
.orderBy(
ROUTINES.ROUTINE_SCHEMA,
ROUTINES.ROUTINE_NAME)
.fetch()) {
String datatype = record.get("datatype", String.class);
// [#3285] We currently do not recognise HSQLDB table-valued functions as such.
if (datatype != null && datatype.toUpperCase().startsWith("ROW")) {
JooqLogger.getLogger(getClass()).info("A row : " +datatype);
datatype = "ROW";
}
result.add(new HSQLDBRoutineDefinition(
getSchema(record.get(ROUTINES.ROUTINE_SCHEMA)),
record.get(ROUTINES.ROUTINE_NAME),
record.get(ROUTINES.SPECIFIC_NAME),
datatype,
record.get(ROUTINES.NUMERIC_PRECISION),
record.get(ROUTINES.NUMERIC_SCALE),
record.get("aggregate", boolean.class)));
}
return result;
}

View File

@ -0,0 +1,114 @@
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: https://www.jooq.org/legal/licensing
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq.meta.duckdb;
import static org.jooq.meta.duckdb.system.main.Tables.DUCKDB_COLUMNS;
import static org.jooq.meta.hsqldb.information_schema.Tables.COLUMNS;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.jooq.Record;
import org.jooq.TableOptions.TableType;
import org.jooq.meta.AbstractTableDefinition;
import org.jooq.meta.ColumnDefinition;
import org.jooq.meta.DataTypeDefinition;
import org.jooq.meta.DefaultColumnDefinition;
import org.jooq.meta.DefaultDataTypeDefinition;
import org.jooq.meta.SchemaDefinition;
/**
* @author Lukas Eder
*/
public class DuckDBTableDefinition extends AbstractTableDefinition {
public DuckDBTableDefinition(SchemaDefinition schema, String name, String comment) {
super(schema, name, comment);
}
public DuckDBTableDefinition(SchemaDefinition schema, String name, String comment, TableType tableType, String source) {
super(schema, name, comment, tableType, source);
}
@Override
public List<ColumnDefinition> getElements0() throws SQLException {
List<ColumnDefinition> result = new ArrayList<>();
for (Record record : create()
.select(
DUCKDB_COLUMNS.COLUMN_NAME,
DUCKDB_COLUMNS.COLUMN_INDEX,
DUCKDB_COLUMNS.DATA_TYPE,
DUCKDB_COLUMNS.CHARACTER_MAXIMUM_LENGTH,
DUCKDB_COLUMNS.NUMERIC_PRECISION,
DUCKDB_COLUMNS.NUMERIC_SCALE,
DUCKDB_COLUMNS.IS_NULLABLE,
DUCKDB_COLUMNS.COLUMN_DEFAULT
)
.from("{0}()", DUCKDB_COLUMNS)
.where(DUCKDB_COLUMNS.DATABASE_NAME.eq(getCatalog().getInputName()))
.and(DUCKDB_COLUMNS.SCHEMA_NAME.eq(getSchema().getInputName()))
.and(DUCKDB_COLUMNS.TABLE_NAME.eq(getInputName()))
.orderBy(DUCKDB_COLUMNS.COLUMN_INDEX)
) {
DataTypeDefinition type = new DefaultDataTypeDefinition(
getDatabase(),
getSchema(),
record.get(DUCKDB_COLUMNS.DATA_TYPE),
record.get(DUCKDB_COLUMNS.CHARACTER_MAXIMUM_LENGTH),
record.get(DUCKDB_COLUMNS.NUMERIC_PRECISION),
record.get(DUCKDB_COLUMNS.NUMERIC_SCALE),
record.get(DUCKDB_COLUMNS.IS_NULLABLE),
record.get(DUCKDB_COLUMNS.COLUMN_DEFAULT)
);
result.add(new DefaultColumnDefinition(
this,
record.get(DUCKDB_COLUMNS.COLUMN_NAME),
record.get(DUCKDB_COLUMNS.COLUMN_INDEX),
type,
false,
null
));
}
return result;
}
}

View File

@ -0,0 +1,62 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system;
import java.util.Arrays;
import java.util.List;
import org.jooq.Constants;
import org.jooq.Schema;
import org.jooq.impl.CatalogImpl;
import org.jooq.meta.duckdb.system.information_schema.InformationSchema;
import org.jooq.meta.duckdb.system.main.Main;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class System extends CatalogImpl {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system</code>
*/
public static final System SYSTEM = new System();
/**
* The schema <code>system.information_schema</code>.
*/
public final InformationSchema INFORMATION_SCHEMA = InformationSchema.INFORMATION_SCHEMA;
/**
* The schema <code>system.main</code>.
*/
public final Main MAIN = Main.MAIN;
/**
* No further instances allowed
*/
private System() {
super("system");
}
@Override
public final List<Schema> getSchemas() {
return Arrays.asList(
InformationSchema.INFORMATION_SCHEMA,
Main.MAIN
);
}
/**
* A reference to the 3.19 minor release of the code generator. If this
* doesn't compile, it's because the runtime library uses an older minor
* release, namely: 3.19. You can turn off the generation of this reference
* by specifying /configuration/generator/generate/jooqVersionReference
*/
private static final String REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_19;
}

View File

@ -0,0 +1,68 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.information_schema;
import java.util.Arrays;
import java.util.List;
import org.jooq.Catalog;
import org.jooq.Table;
import org.jooq.impl.SchemaImpl;
import org.jooq.meta.duckdb.system.System;
import org.jooq.meta.duckdb.system.information_schema.tables.Columns;
import org.jooq.meta.duckdb.system.information_schema.tables.Schemata;
import org.jooq.meta.duckdb.system.information_schema.tables.Tables;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class InformationSchema extends SchemaImpl {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.information_schema</code>
*/
public static final InformationSchema INFORMATION_SCHEMA = new InformationSchema();
/**
* The table <code>system.information_schema.columns</code>.
*/
public final Columns COLUMNS = Columns.COLUMNS;
/**
* The table <code>system.information_schema.schemata</code>.
*/
public final Schemata SCHEMATA = Schemata.SCHEMATA;
/**
* The table <code>system.information_schema.tables</code>.
*/
public final Tables TABLES = Tables.TABLES;
/**
* No further instances allowed
*/
private InformationSchema() {
super("information_schema", null);
}
@Override
public Catalog getCatalog() {
return System.SYSTEM;
}
@Override
public final List<Table<?>> getTables() {
return Arrays.asList(
Columns.COLUMNS,
Schemata.SCHEMATA,
Tables.TABLES
);
}
}

View File

@ -0,0 +1,39 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.information_schema;
import org.jooq.ForeignKey;
import org.jooq.Record;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.Internal;
import org.jooq.meta.duckdb.system.information_schema.tables.Columns;
import org.jooq.meta.duckdb.system.information_schema.tables.Schemata;
import org.jooq.meta.duckdb.system.information_schema.tables.Tables;
/**
* A class modelling foreign key relationships and constraints of tables in
* information_schema.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Keys {
// -------------------------------------------------------------------------
// UNIQUE and PRIMARY KEY definitions
// -------------------------------------------------------------------------
public static final UniqueKey<Record> SYNTHETIC_PK_SCHEMATA = Internal.createUniqueKey(Schemata.SCHEMATA, DSL.name("SYNTHETIC_PK_schemata"), new TableField[] { Schemata.SCHEMATA.CATALOG_NAME, Schemata.SCHEMATA.SCHEMA_NAME }, true);
public static final UniqueKey<Record> SYNTHETIC_PK_TABLES = Internal.createUniqueKey(Tables.TABLES, DSL.name("SYNTHETIC_PK_tables"), new TableField[] { Tables.TABLES.TABLE_CATALOG, Tables.TABLES.TABLE_SCHEMA, Tables.TABLES.TABLE_NAME }, true);
// -------------------------------------------------------------------------
// FOREIGN KEY definitions
// -------------------------------------------------------------------------
public static final ForeignKey<Record, Record> SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA = Internal.createForeignKey(Columns.COLUMNS, DSL.name("SYNTHETIC_FK_columns__SYNTHETIC_PK_schemata"), new TableField[] { Columns.COLUMNS.TABLE_CATALOG, Columns.COLUMNS.TABLE_SCHEMA }, Keys.SYNTHETIC_PK_SCHEMATA, new TableField[] { Schemata.SCHEMATA.CATALOG_NAME, Schemata.SCHEMATA.SCHEMA_NAME }, true);
public static final ForeignKey<Record, Record> SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES = Internal.createForeignKey(Columns.COLUMNS, DSL.name("SYNTHETIC_FK_columns__SYNTHETIC_PK_tables"), new TableField[] { Columns.COLUMNS.TABLE_CATALOG, Columns.COLUMNS.TABLE_SCHEMA, Columns.COLUMNS.TABLE_NAME }, Keys.SYNTHETIC_PK_TABLES, new TableField[] { Tables.TABLES.TABLE_CATALOG, Tables.TABLES.TABLE_SCHEMA, Tables.TABLES.TABLE_NAME }, true);
public static final ForeignKey<Record, Record> SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA = Internal.createForeignKey(Tables.TABLES, DSL.name("SYNTHETIC_FK_tables__SYNTHETIC_PK_schemata"), new TableField[] { Tables.TABLES.TABLE_CATALOG, Tables.TABLES.TABLE_SCHEMA }, Keys.SYNTHETIC_PK_SCHEMATA, new TableField[] { Schemata.SCHEMATA.CATALOG_NAME, Schemata.SCHEMATA.SCHEMA_NAME }, true);
}

View File

@ -0,0 +1,31 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.information_schema;
import org.jooq.meta.duckdb.system.information_schema.tables.Columns;
import org.jooq.meta.duckdb.system.information_schema.tables.Schemata;
/**
* Convenience access to all tables in information_schema.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Tables {
/**
* The table <code>system.information_schema.columns</code>.
*/
public static final Columns COLUMNS = Columns.COLUMNS;
/**
* The table <code>system.information_schema.schemata</code>.
*/
public static final Schemata SCHEMATA = Schemata.SCHEMATA;
/**
* The table <code>system.information_schema.tables</code>.
*/
public static final org.jooq.meta.duckdb.system.information_schema.tables.Tables TABLES = org.jooq.meta.duckdb.system.information_schema.tables.Tables.TABLES;
}

View File

@ -0,0 +1,570 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.information_schema.tables;
import java.util.Arrays;
import java.util.List;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.information_schema.InformationSchema;
import org.jooq.meta.duckdb.system.information_schema.Keys;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Columns extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.information_schema.columns</code>
*/
public static final Columns COLUMNS = new Columns();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.information_schema.columns.table_catalog</code>.
*/
public final TableField<Record, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.columns.table_schema</code>.
*/
public final TableField<Record, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.columns.table_name</code>.
*/
public final TableField<Record, String> TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.columns.column_name</code>.
*/
public final TableField<Record, String> COLUMN_NAME = createField(DSL.name("column_name"), SQLDataType.VARCHAR, this, "");
/**
* The column
* <code>system.information_schema.columns.ordinal_position</code>.
*/
public final TableField<Record, Integer> ORDINAL_POSITION = createField(DSL.name("ordinal_position"), SQLDataType.INTEGER, this, "");
/**
* The column <code>system.information_schema.columns.column_default</code>.
*/
public final TableField<Record, String> COLUMN_DEFAULT = createField(DSL.name("column_default"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.columns.is_nullable</code>.
*/
public final TableField<Record, String> IS_NULLABLE = createField(DSL.name("is_nullable"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.columns.data_type</code>.
*/
public final TableField<Record, String> DATA_TYPE = createField(DSL.name("data_type"), SQLDataType.VARCHAR, this, "");
/**
* The column
* <code>system.information_schema.columns.character_maximum_length</code>.
*/
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.
*/
@Deprecated
public final TableField<Record, Object> CHARACTER_OCTET_LENGTH = createField(DSL.name("character_octet_length"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), this, "");
/**
* The column
* <code>system.information_schema.columns.numeric_precision</code>.
*/
public final TableField<Record, Integer> NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), SQLDataType.INTEGER, this, "");
/**
* The column
* <code>system.information_schema.columns.numeric_precision_radix</code>.
*/
public final TableField<Record, Integer> NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), SQLDataType.INTEGER, this, "");
/**
* The column <code>system.information_schema.columns.numeric_scale</code>.
*/
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.
*/
@Deprecated
public final TableField<Record, Object> DATETIME_PRECISION = createField(DSL.name("datetime_precision"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> INTERVAL_TYPE = createField(DSL.name("interval_type"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> INTERVAL_PRECISION = createField(DSL.name("interval_precision"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> CHARACTER_SET_CATALOG = createField(DSL.name("character_set_catalog"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> CHARACTER_SET_SCHEMA = createField(DSL.name("character_set_schema"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> CHARACTER_SET_NAME = createField(DSL.name("character_set_name"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> COLLATION_CATALOG = createField(DSL.name("collation_catalog"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> COLLATION_SCHEMA = createField(DSL.name("collation_schema"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> COLLATION_NAME = createField(DSL.name("collation_name"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> DOMAIN_CATALOG = createField(DSL.name("domain_catalog"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> DOMAIN_SCHEMA = createField(DSL.name("domain_schema"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> DOMAIN_NAME = createField(DSL.name("domain_name"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> UDT_CATALOG = createField(DSL.name("udt_catalog"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> UDT_SCHEMA = createField(DSL.name("udt_schema"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> UDT_NAME = createField(DSL.name("udt_name"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> SCOPE_CATALOG = createField(DSL.name("scope_catalog"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> SCOPE_SCHEMA = createField(DSL.name("scope_schema"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> SCOPE_NAME = createField(DSL.name("scope_name"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> MAXIMUM_CARDINALITY = createField(DSL.name("maximum_cardinality"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> DTD_IDENTIFIER = createField(DSL.name("dtd_identifier"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> IS_SELF_REFERENCING = createField(DSL.name("is_self_referencing"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> IS_IDENTITY = createField(DSL.name("is_identity"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> IDENTITY_GENERATION = createField(DSL.name("identity_generation"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> IDENTITY_START = createField(DSL.name("identity_start"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> IDENTITY_INCREMENT = createField(DSL.name("identity_increment"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> IDENTITY_MAXIMUM = createField(DSL.name("identity_maximum"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> IDENTITY_MINIMUM = createField(DSL.name("identity_minimum"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> IDENTITY_CYCLE = createField(DSL.name("identity_cycle"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> IS_GENERATED = createField(DSL.name("is_generated"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> GENERATION_EXPRESSION = createField(DSL.name("generation_expression"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> IS_UPDATABLE = createField(DSL.name("is_updatable"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), this, "");
private Columns(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private Columns(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.information_schema.columns</code> table
* reference
*/
public Columns(String alias) {
this(DSL.name(alias), COLUMNS);
}
/**
* Create an aliased <code>system.information_schema.columns</code> table
* reference
*/
public Columns(Name alias) {
this(alias, COLUMNS);
}
/**
* Create a <code>system.information_schema.columns</code> table reference
*/
public Columns() {
this(DSL.name("columns"), null);
}
public <O extends Record> Columns(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, COLUMNS);
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
}
@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;
private transient Schemata _schemata;
/**
* 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);
return _tables;
}
/**
* Get the implicit join path to the
* <code>system.information_schema.schemata</code> table.
*/
public Schemata schemata() {
if (_schemata == null)
_schemata = new Schemata(this, Keys.SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA);
return _schemata;
}
@Override
public Columns as(String alias) {
return new Columns(DSL.name(alias), this);
}
@Override
public Columns as(Name alias) {
return new Columns(alias, this);
}
@Override
public Columns as(Table<?> alias) {
return new Columns(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public Columns rename(String name) {
return new Columns(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public Columns rename(Name name) {
return new Columns(name, null);
}
/**
* Rename this table
*/
@Override
public Columns rename(Table<?> name) {
return new Columns(name.getQualifiedName(), null);
}
}

View File

@ -0,0 +1,180 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.information_schema.tables;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.information_schema.InformationSchema;
import org.jooq.meta.duckdb.system.information_schema.Keys;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Schemata extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.information_schema.schemata</code>
*/
public static final Schemata SCHEMATA = new Schemata();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.information_schema.schemata.catalog_name</code>.
*/
public final TableField<Record, String> CATALOG_NAME = createField(DSL.name("catalog_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.schemata.schema_name</code>.
*/
public final TableField<Record, String> SCHEMA_NAME = createField(DSL.name("schema_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.schemata.schema_owner</code>.
*/
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.
*/
@Deprecated
public final TableField<Record, Object> DEFAULT_CHARACTER_SET_CATALOG = createField(DSL.name("default_character_set_catalog"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> DEFAULT_CHARACTER_SET_SCHEMA = createField(DSL.name("default_character_set_schema"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> DEFAULT_CHARACTER_SET_NAME = createField(DSL.name("default_character_set_name"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), this, "");
/**
* The column <code>system.information_schema.schemata.sql_path</code>.
*/
public final TableField<Record, String> SQL_PATH = createField(DSL.name("sql_path"), SQLDataType.VARCHAR, this, "");
private Schemata(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private Schemata(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.information_schema.schemata</code> table
* reference
*/
public Schemata(String alias) {
this(DSL.name(alias), SCHEMATA);
}
/**
* Create an aliased <code>system.information_schema.schemata</code> table
* reference
*/
public Schemata(Name alias) {
this(alias, SCHEMATA);
}
/**
* Create a <code>system.information_schema.schemata</code> table reference
*/
public Schemata() {
this(DSL.name("schemata"), null);
}
public <O extends Record> Schemata(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, SCHEMATA);
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
}
@Override
public UniqueKey<Record> getPrimaryKey() {
return Keys.SYNTHETIC_PK_SCHEMATA;
}
@Override
public Schemata as(String alias) {
return new Schemata(DSL.name(alias), this);
}
@Override
public Schemata as(Name alias) {
return new Schemata(alias, this);
}
@Override
public Schemata as(Table<?> alias) {
return new Schemata(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public Schemata rename(String name) {
return new Schemata(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public Schemata rename(Name name) {
return new Schemata(name, null);
}
/**
* Rename this table
*/
@Override
public Schemata rename(Table<?> name) {
return new Schemata(name.getQualifiedName(), null);
}
}

View File

@ -0,0 +1,239 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.information_schema.tables;
import java.util.Arrays;
import java.util.List;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.information_schema.InformationSchema;
import org.jooq.meta.duckdb.system.information_schema.Keys;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Tables extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.information_schema.tables</code>
*/
public static final Tables TABLES = new Tables();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.information_schema.tables.table_catalog</code>.
*/
public final TableField<Record, String> TABLE_CATALOG = createField(DSL.name("table_catalog"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.tables.table_schema</code>.
*/
public final TableField<Record, String> TABLE_SCHEMA = createField(DSL.name("table_schema"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.tables.table_name</code>.
*/
public final TableField<Record, String> TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.tables.table_type</code>.
*/
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.
*/
@Deprecated
public final TableField<Record, Object> SELF_REFERENCING_COLUMN_NAME = createField(DSL.name("self_referencing_column_name"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> REFERENCE_GENERATION = createField(DSL.name("reference_generation"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> USER_DEFINED_TYPE_CATALOG = createField(DSL.name("user_defined_type_catalog"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> USER_DEFINED_TYPE_SCHEMA = createField(DSL.name("user_defined_type_schema"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), 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> USER_DEFINED_TYPE_NAME = createField(DSL.name("user_defined_type_name"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"NULL\""), this, "");
/**
* The column
* <code>system.information_schema.tables.is_insertable_into</code>.
*/
public final TableField<Record, String> IS_INSERTABLE_INTO = createField(DSL.name("is_insertable_into"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.tables.is_typed</code>.
*/
public final TableField<Record, String> IS_TYPED = createField(DSL.name("is_typed"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.information_schema.tables.commit_action</code>.
*/
public final TableField<Record, String> COMMIT_ACTION = createField(DSL.name("commit_action"), SQLDataType.VARCHAR, this, "");
private Tables(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private Tables(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.information_schema.tables</code> table
* reference
*/
public Tables(String alias) {
this(DSL.name(alias), TABLES);
}
/**
* Create an aliased <code>system.information_schema.tables</code> table
* reference
*/
public Tables(Name alias) {
this(alias, TABLES);
}
/**
* Create a <code>system.information_schema.tables</code> table reference
*/
public Tables() {
this(DSL.name("tables"), null);
}
public <O extends Record> Tables(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, TABLES);
}
@Override
public Schema getSchema() {
return aliased() ? null : InformationSchema.INFORMATION_SCHEMA;
}
@Override
public UniqueKey<Record> getPrimaryKey() {
return Keys.SYNTHETIC_PK_TABLES;
}
@Override
public List<ForeignKey<Record, ?>> getReferences() {
return Arrays.asList(Keys.SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA);
}
private transient Schemata _schemata;
/**
* Get the implicit join path to the
* <code>system.information_schema.schemata</code> table.
*/
public Schemata schemata() {
if (_schemata == null)
_schemata = new Schemata(this, Keys.SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA);
return _schemata;
}
@Override
public Tables as(String alias) {
return new Tables(DSL.name(alias), this);
}
@Override
public Tables as(Name alias) {
return new Tables(alias, this);
}
@Override
public Tables as(Table<?> alias) {
return new Tables(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public Tables rename(String name) {
return new Tables(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public Tables rename(Name name) {
return new Tables(name, null);
}
/**
* Rename this table
*/
@Override
public Tables rename(Table<?> name) {
return new Tables(name.getQualifiedName(), null);
}
}

View File

@ -0,0 +1,103 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.main;
import java.util.Arrays;
import java.util.List;
import org.jooq.Catalog;
import org.jooq.Table;
import org.jooq.impl.SchemaImpl;
import org.jooq.meta.duckdb.system.System;
import org.jooq.meta.duckdb.system.main.tables.DuckdbColumns;
import org.jooq.meta.duckdb.system.main.tables.DuckdbConstraints;
import org.jooq.meta.duckdb.system.main.tables.DuckdbDatabases;
import org.jooq.meta.duckdb.system.main.tables.DuckdbIndexes;
import org.jooq.meta.duckdb.system.main.tables.DuckdbSchemas;
import org.jooq.meta.duckdb.system.main.tables.DuckdbTables;
import org.jooq.meta.duckdb.system.main.tables.DuckdbTypes;
import org.jooq.meta.duckdb.system.main.tables.DuckdbViews;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Main extends SchemaImpl {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.main</code>
*/
public static final Main MAIN = new Main();
/**
* The table <code>system.main.duckdb_columns</code>.
*/
public final DuckdbColumns DUCKDB_COLUMNS = DuckdbColumns.DUCKDB_COLUMNS;
/**
* The table <code>system.main.duckdb_constraints</code>.
*/
public final DuckdbConstraints DUCKDB_CONSTRAINTS = DuckdbConstraints.DUCKDB_CONSTRAINTS;
/**
* The table <code>system.main.duckdb_databases</code>.
*/
public final DuckdbDatabases DUCKDB_DATABASES = DuckdbDatabases.DUCKDB_DATABASES;
/**
* The table <code>system.main.duckdb_indexes</code>.
*/
public final DuckdbIndexes DUCKDB_INDEXES = DuckdbIndexes.DUCKDB_INDEXES;
/**
* The table <code>system.main.duckdb_schemas</code>.
*/
public final DuckdbSchemas DUCKDB_SCHEMAS = DuckdbSchemas.DUCKDB_SCHEMAS;
/**
* The table <code>system.main.duckdb_tables</code>.
*/
public final DuckdbTables DUCKDB_TABLES = DuckdbTables.DUCKDB_TABLES;
/**
* The table <code>system.main.duckdb_types</code>.
*/
public final DuckdbTypes DUCKDB_TYPES = DuckdbTypes.DUCKDB_TYPES;
/**
* The table <code>system.main.duckdb_views</code>.
*/
public final DuckdbViews DUCKDB_VIEWS = DuckdbViews.DUCKDB_VIEWS;
/**
* No further instances allowed
*/
private Main() {
super("main", null);
}
@Override
public Catalog getCatalog() {
return System.SYSTEM;
}
@Override
public final List<Table<?>> getTables() {
return Arrays.asList(
DuckdbColumns.DUCKDB_COLUMNS,
DuckdbConstraints.DUCKDB_CONSTRAINTS,
DuckdbDatabases.DUCKDB_DATABASES,
DuckdbIndexes.DUCKDB_INDEXES,
DuckdbSchemas.DUCKDB_SCHEMAS,
DuckdbTables.DUCKDB_TABLES,
DuckdbTypes.DUCKDB_TYPES,
DuckdbViews.DUCKDB_VIEWS
);
}
}

View File

@ -0,0 +1,62 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.main;
import org.jooq.meta.duckdb.system.main.tables.DuckdbColumns;
import org.jooq.meta.duckdb.system.main.tables.DuckdbConstraints;
import org.jooq.meta.duckdb.system.main.tables.DuckdbDatabases;
import org.jooq.meta.duckdb.system.main.tables.DuckdbIndexes;
import org.jooq.meta.duckdb.system.main.tables.DuckdbSchemas;
import org.jooq.meta.duckdb.system.main.tables.DuckdbTables;
import org.jooq.meta.duckdb.system.main.tables.DuckdbTypes;
import org.jooq.meta.duckdb.system.main.tables.DuckdbViews;
/**
* Convenience access to all tables in main.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Tables {
/**
* The table <code>system.main.duckdb_columns</code>.
*/
public static final DuckdbColumns DUCKDB_COLUMNS = DuckdbColumns.DUCKDB_COLUMNS;
/**
* The table <code>system.main.duckdb_constraints</code>.
*/
public static final DuckdbConstraints DUCKDB_CONSTRAINTS = DuckdbConstraints.DUCKDB_CONSTRAINTS;
/**
* The table <code>system.main.duckdb_databases</code>.
*/
public static final DuckdbDatabases DUCKDB_DATABASES = DuckdbDatabases.DUCKDB_DATABASES;
/**
* The table <code>system.main.duckdb_indexes</code>.
*/
public static final DuckdbIndexes DUCKDB_INDEXES = DuckdbIndexes.DUCKDB_INDEXES;
/**
* The table <code>system.main.duckdb_schemas</code>.
*/
public static final DuckdbSchemas DUCKDB_SCHEMAS = DuckdbSchemas.DUCKDB_SCHEMAS;
/**
* The table <code>system.main.duckdb_tables</code>.
*/
public static final DuckdbTables DUCKDB_TABLES = DuckdbTables.DUCKDB_TABLES;
/**
* The table <code>system.main.duckdb_types</code>.
*/
public static final DuckdbTypes DUCKDB_TYPES = DuckdbTypes.DUCKDB_TYPES;
/**
* The table <code>system.main.duckdb_views</code>.
*/
public static final DuckdbViews DUCKDB_VIEWS = DuckdbViews.DUCKDB_VIEWS;
}

View File

@ -0,0 +1,205 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.main.tables;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DuckdbColumns extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.main.duckdb_columns</code>
*/
public static final DuckdbColumns DUCKDB_COLUMNS = new DuckdbColumns();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.main.duckdb_columns.database_name</code>.
*/
public final TableField<Record, String> DATABASE_NAME = createField(DSL.name("database_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_columns.database_oid</code>.
*/
public final TableField<Record, Long> DATABASE_OID = createField(DSL.name("database_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_columns.schema_name</code>.
*/
public final TableField<Record, String> SCHEMA_NAME = createField(DSL.name("schema_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_columns.schema_oid</code>.
*/
public final TableField<Record, Long> SCHEMA_OID = createField(DSL.name("schema_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_columns.table_name</code>.
*/
public final TableField<Record, String> TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_columns.table_oid</code>.
*/
public final TableField<Record, Long> TABLE_OID = createField(DSL.name("table_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_columns.column_name</code>.
*/
public final TableField<Record, String> COLUMN_NAME = createField(DSL.name("column_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_columns.column_index</code>.
*/
public final TableField<Record, Integer> COLUMN_INDEX = createField(DSL.name("column_index"), SQLDataType.INTEGER, this, "");
/**
* The column <code>system.main.duckdb_columns.internal</code>.
*/
public final TableField<Record, Boolean> INTERNAL = createField(DSL.name("internal"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_columns.column_default</code>.
*/
public final TableField<Record, String> COLUMN_DEFAULT = createField(DSL.name("column_default"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_columns.is_nullable</code>.
*/
public final TableField<Record, Boolean> IS_NULLABLE = createField(DSL.name("is_nullable"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_columns.data_type</code>.
*/
public final TableField<Record, String> DATA_TYPE = createField(DSL.name("data_type"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_columns.data_type_id</code>.
*/
public final TableField<Record, Long> DATA_TYPE_ID = createField(DSL.name("data_type_id"), SQLDataType.BIGINT, this, "");
/**
* The column
* <code>system.main.duckdb_columns.character_maximum_length</code>.
*/
public final TableField<Record, Integer> CHARACTER_MAXIMUM_LENGTH = createField(DSL.name("character_maximum_length"), SQLDataType.INTEGER, this, "");
/**
* The column <code>system.main.duckdb_columns.numeric_precision</code>.
*/
public final TableField<Record, Integer> NUMERIC_PRECISION = createField(DSL.name("numeric_precision"), SQLDataType.INTEGER, this, "");
/**
* The column
* <code>system.main.duckdb_columns.numeric_precision_radix</code>.
*/
public final TableField<Record, Integer> NUMERIC_PRECISION_RADIX = createField(DSL.name("numeric_precision_radix"), SQLDataType.INTEGER, this, "");
/**
* The column <code>system.main.duckdb_columns.numeric_scale</code>.
*/
public final TableField<Record, Integer> NUMERIC_SCALE = createField(DSL.name("numeric_scale"), SQLDataType.INTEGER, this, "");
private DuckdbColumns(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private DuckdbColumns(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.main.duckdb_columns</code> table reference
*/
public DuckdbColumns(String alias) {
this(DSL.name(alias), DUCKDB_COLUMNS);
}
/**
* Create an aliased <code>system.main.duckdb_columns</code> table reference
*/
public DuckdbColumns(Name alias) {
this(alias, DUCKDB_COLUMNS);
}
/**
* Create a <code>system.main.duckdb_columns</code> table reference
*/
public DuckdbColumns() {
this(DSL.name("duckdb_columns"), null);
}
public <O extends Record> DuckdbColumns(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, DUCKDB_COLUMNS);
}
@Override
public Schema getSchema() {
return aliased() ? null : Main.MAIN;
}
@Override
public DuckdbColumns as(String alias) {
return new DuckdbColumns(DSL.name(alias), this);
}
@Override
public DuckdbColumns as(Name alias) {
return new DuckdbColumns(alias, this);
}
@Override
public DuckdbColumns as(Table<?> alias) {
return new DuckdbColumns(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public DuckdbColumns rename(String name) {
return new DuckdbColumns(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public DuckdbColumns rename(Name name) {
return new DuckdbColumns(name, null);
}
/**
* Rename this table
*/
@Override
public DuckdbColumns rename(Table<?> name) {
return new DuckdbColumns(name.getQualifiedName(), null);
}
}

View File

@ -0,0 +1,192 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.main.tables;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DuckdbConstraints extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.main.duckdb_constraints</code>
*/
public static final DuckdbConstraints DUCKDB_CONSTRAINTS = new DuckdbConstraints();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.main.duckdb_constraints.database_name</code>.
*/
public final TableField<Record, String> DATABASE_NAME = createField(DSL.name("database_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_constraints.database_oid</code>.
*/
public final TableField<Record, Long> DATABASE_OID = createField(DSL.name("database_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_constraints.schema_name</code>.
*/
public final TableField<Record, String> SCHEMA_NAME = createField(DSL.name("schema_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_constraints.schema_oid</code>.
*/
public final TableField<Record, Long> SCHEMA_OID = createField(DSL.name("schema_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_constraints.table_name</code>.
*/
public final TableField<Record, String> TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_constraints.table_oid</code>.
*/
public final TableField<Record, Long> TABLE_OID = createField(DSL.name("table_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_constraints.constraint_index</code>.
*/
public final TableField<Record, Long> CONSTRAINT_INDEX = createField(DSL.name("constraint_index"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_constraints.constraint_type</code>.
*/
public final TableField<Record, String> CONSTRAINT_TYPE = createField(DSL.name("constraint_type"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_constraints.constraint_text</code>.
*/
public final TableField<Record, String> CONSTRAINT_TEXT = createField(DSL.name("constraint_text"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_constraints.expression</code>.
*/
public final TableField<Record, String> EXPRESSION = createField(DSL.name("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.
*/
@Deprecated
public final TableField<Record, Object> CONSTRAINT_COLUMN_INDEXES = createField(DSL.name("constraint_column_indexes"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"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.
*/
@Deprecated
public final TableField<Record, Object> CONSTRAINT_COLUMN_NAMES = createField(DSL.name("constraint_column_names"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"VARCHAR[]\""), this, "");
private DuckdbConstraints(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private DuckdbConstraints(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.main.duckdb_constraints</code> table
* reference
*/
public DuckdbConstraints(String alias) {
this(DSL.name(alias), DUCKDB_CONSTRAINTS);
}
/**
* Create an aliased <code>system.main.duckdb_constraints</code> table
* reference
*/
public DuckdbConstraints(Name alias) {
this(alias, DUCKDB_CONSTRAINTS);
}
/**
* Create a <code>system.main.duckdb_constraints</code> table reference
*/
public DuckdbConstraints() {
this(DSL.name("duckdb_constraints"), null);
}
public <O extends Record> DuckdbConstraints(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, DUCKDB_CONSTRAINTS);
}
@Override
public Schema getSchema() {
return aliased() ? null : Main.MAIN;
}
@Override
public DuckdbConstraints as(String alias) {
return new DuckdbConstraints(DSL.name(alias), this);
}
@Override
public DuckdbConstraints as(Name alias) {
return new DuckdbConstraints(alias, this);
}
@Override
public DuckdbConstraints as(Table<?> alias) {
return new DuckdbConstraints(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public DuckdbConstraints rename(String name) {
return new DuckdbConstraints(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public DuckdbConstraints rename(Name name) {
return new DuckdbConstraints(name, null);
}
/**
* Rename this table
*/
@Override
public DuckdbConstraints rename(Table<?> name) {
return new DuckdbConstraints(name.getQualifiedName(), null);
}
}

View File

@ -0,0 +1,145 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.main.tables;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DuckdbDatabases extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.main.duckdb_databases</code>
*/
public static final DuckdbDatabases DUCKDB_DATABASES = new DuckdbDatabases();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.main.duckdb_databases.database_name</code>.
*/
public final TableField<Record, String> DATABASE_NAME = createField(DSL.name("database_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_databases.database_oid</code>.
*/
public final TableField<Record, Long> DATABASE_OID = createField(DSL.name("database_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_databases.path</code>.
*/
public final TableField<Record, String> PATH = createField(DSL.name("path"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_databases.internal</code>.
*/
public final TableField<Record, Boolean> INTERNAL = createField(DSL.name("internal"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_databases.type</code>.
*/
public final TableField<Record, String> TYPE = createField(DSL.name("type"), SQLDataType.VARCHAR, this, "");
private DuckdbDatabases(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private DuckdbDatabases(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.main.duckdb_databases</code> table
* reference
*/
public DuckdbDatabases(String alias) {
this(DSL.name(alias), DUCKDB_DATABASES);
}
/**
* Create an aliased <code>system.main.duckdb_databases</code> table
* reference
*/
public DuckdbDatabases(Name alias) {
this(alias, DUCKDB_DATABASES);
}
/**
* Create a <code>system.main.duckdb_databases</code> table reference
*/
public DuckdbDatabases() {
this(DSL.name("duckdb_databases"), null);
}
public <O extends Record> DuckdbDatabases(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, DUCKDB_DATABASES);
}
@Override
public Schema getSchema() {
return aliased() ? null : Main.MAIN;
}
@Override
public DuckdbDatabases as(String alias) {
return new DuckdbDatabases(DSL.name(alias), this);
}
@Override
public DuckdbDatabases as(Name alias) {
return new DuckdbDatabases(alias, this);
}
@Override
public DuckdbDatabases as(Table<?> alias) {
return new DuckdbDatabases(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public DuckdbDatabases rename(String name) {
return new DuckdbDatabases(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public DuckdbDatabases rename(Name name) {
return new DuckdbDatabases(name, null);
}
/**
* Rename this table
*/
@Override
public DuckdbDatabases rename(Table<?> name) {
return new DuckdbDatabases(name.getQualifiedName(), null);
}
}

View File

@ -0,0 +1,178 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.main.tables;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DuckdbIndexes extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.main.duckdb_indexes</code>
*/
public static final DuckdbIndexes DUCKDB_INDEXES = new DuckdbIndexes();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.main.duckdb_indexes.database_name</code>.
*/
public final TableField<Record, String> DATABASE_NAME = createField(DSL.name("database_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_indexes.database_oid</code>.
*/
public final TableField<Record, Long> DATABASE_OID = createField(DSL.name("database_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_indexes.schema_name</code>.
*/
public final TableField<Record, String> SCHEMA_NAME = createField(DSL.name("schema_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_indexes.schema_oid</code>.
*/
public final TableField<Record, Long> SCHEMA_OID = createField(DSL.name("schema_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_indexes.index_name</code>.
*/
public final TableField<Record, String> INDEX_NAME = createField(DSL.name("index_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_indexes.index_oid</code>.
*/
public final TableField<Record, Long> INDEX_OID = createField(DSL.name("index_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_indexes.table_name</code>.
*/
public final TableField<Record, String> TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_indexes.table_oid</code>.
*/
public final TableField<Record, Long> TABLE_OID = createField(DSL.name("table_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_indexes.is_unique</code>.
*/
public final TableField<Record, Boolean> IS_UNIQUE = createField(DSL.name("is_unique"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_indexes.is_primary</code>.
*/
public final TableField<Record, Boolean> IS_PRIMARY = createField(DSL.name("is_primary"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_indexes.expressions</code>.
*/
public final TableField<Record, String> EXPRESSIONS = createField(DSL.name("expressions"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_indexes.sql</code>.
*/
public final TableField<Record, String> SQL = createField(DSL.name("sql"), SQLDataType.VARCHAR, this, "");
private DuckdbIndexes(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private DuckdbIndexes(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.main.duckdb_indexes</code> table reference
*/
public DuckdbIndexes(String alias) {
this(DSL.name(alias), DUCKDB_INDEXES);
}
/**
* Create an aliased <code>system.main.duckdb_indexes</code> table reference
*/
public DuckdbIndexes(Name alias) {
this(alias, DUCKDB_INDEXES);
}
/**
* Create a <code>system.main.duckdb_indexes</code> table reference
*/
public DuckdbIndexes() {
this(DSL.name("duckdb_indexes"), null);
}
public <O extends Record> DuckdbIndexes(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, DUCKDB_INDEXES);
}
@Override
public Schema getSchema() {
return aliased() ? null : Main.MAIN;
}
@Override
public DuckdbIndexes as(String alias) {
return new DuckdbIndexes(DSL.name(alias), this);
}
@Override
public DuckdbIndexes as(Name alias) {
return new DuckdbIndexes(alias, this);
}
@Override
public DuckdbIndexes as(Table<?> alias) {
return new DuckdbIndexes(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public DuckdbIndexes rename(String name) {
return new DuckdbIndexes(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public DuckdbIndexes rename(Name name) {
return new DuckdbIndexes(name, null);
}
/**
* Rename this table
*/
@Override
public DuckdbIndexes rename(Table<?> name) {
return new DuckdbIndexes(name.getQualifiedName(), null);
}
}

View File

@ -0,0 +1,148 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.main.tables;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DuckdbSchemas extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.main.duckdb_schemas</code>
*/
public static final DuckdbSchemas DUCKDB_SCHEMAS = new DuckdbSchemas();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.main.duckdb_schemas.oid</code>.
*/
public final TableField<Record, Long> OID = createField(DSL.name("oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_schemas.database_name</code>.
*/
public final TableField<Record, String> DATABASE_NAME = createField(DSL.name("database_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_schemas.database_oid</code>.
*/
public final TableField<Record, Long> DATABASE_OID = createField(DSL.name("database_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_schemas.schema_name</code>.
*/
public final TableField<Record, String> SCHEMA_NAME = createField(DSL.name("schema_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_schemas.internal</code>.
*/
public final TableField<Record, Boolean> INTERNAL = createField(DSL.name("internal"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_schemas.sql</code>.
*/
public final TableField<Record, String> SQL = createField(DSL.name("sql"), SQLDataType.VARCHAR, this, "");
private DuckdbSchemas(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private DuckdbSchemas(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.main.duckdb_schemas</code> table reference
*/
public DuckdbSchemas(String alias) {
this(DSL.name(alias), DUCKDB_SCHEMAS);
}
/**
* Create an aliased <code>system.main.duckdb_schemas</code> table reference
*/
public DuckdbSchemas(Name alias) {
this(alias, DUCKDB_SCHEMAS);
}
/**
* Create a <code>system.main.duckdb_schemas</code> table reference
*/
public DuckdbSchemas() {
this(DSL.name("duckdb_schemas"), null);
}
public <O extends Record> DuckdbSchemas(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, DUCKDB_SCHEMAS);
}
@Override
public Schema getSchema() {
return aliased() ? null : Main.MAIN;
}
@Override
public DuckdbSchemas as(String alias) {
return new DuckdbSchemas(DSL.name(alias), this);
}
@Override
public DuckdbSchemas as(Name alias) {
return new DuckdbSchemas(alias, this);
}
@Override
public DuckdbSchemas as(Table<?> alias) {
return new DuckdbSchemas(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public DuckdbSchemas rename(String name) {
return new DuckdbSchemas(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public DuckdbSchemas rename(Name name) {
return new DuckdbSchemas(name, null);
}
/**
* Rename this table
*/
@Override
public DuckdbSchemas rename(Table<?> name) {
return new DuckdbSchemas(name.getQualifiedName(), null);
}
}

View File

@ -0,0 +1,188 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.main.tables;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DuckdbTables extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.main.duckdb_tables</code>
*/
public static final DuckdbTables DUCKDB_TABLES = new DuckdbTables();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.main.duckdb_tables.database_name</code>.
*/
public final TableField<Record, String> DATABASE_NAME = createField(DSL.name("database_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_tables.database_oid</code>.
*/
public final TableField<Record, Long> DATABASE_OID = createField(DSL.name("database_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_tables.schema_name</code>.
*/
public final TableField<Record, String> SCHEMA_NAME = createField(DSL.name("schema_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_tables.schema_oid</code>.
*/
public final TableField<Record, Long> SCHEMA_OID = createField(DSL.name("schema_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_tables.table_name</code>.
*/
public final TableField<Record, String> TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_tables.table_oid</code>.
*/
public final TableField<Record, Long> TABLE_OID = createField(DSL.name("table_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_tables.internal</code>.
*/
public final TableField<Record, Boolean> INTERNAL = createField(DSL.name("internal"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_tables.temporary</code>.
*/
public final TableField<Record, Boolean> TEMPORARY = createField(DSL.name("temporary"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_tables.has_primary_key</code>.
*/
public final TableField<Record, Boolean> HAS_PRIMARY_KEY = createField(DSL.name("has_primary_key"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_tables.estimated_size</code>.
*/
public final TableField<Record, Long> ESTIMATED_SIZE = createField(DSL.name("estimated_size"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_tables.column_count</code>.
*/
public final TableField<Record, Long> COLUMN_COUNT = createField(DSL.name("column_count"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_tables.index_count</code>.
*/
public final TableField<Record, Long> INDEX_COUNT = createField(DSL.name("index_count"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_tables.check_constraint_count</code>.
*/
public final TableField<Record, Long> CHECK_CONSTRAINT_COUNT = createField(DSL.name("check_constraint_count"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_tables.sql</code>.
*/
public final TableField<Record, String> SQL = createField(DSL.name("sql"), SQLDataType.VARCHAR, this, "");
private DuckdbTables(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private DuckdbTables(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.main.duckdb_tables</code> table reference
*/
public DuckdbTables(String alias) {
this(DSL.name(alias), DUCKDB_TABLES);
}
/**
* Create an aliased <code>system.main.duckdb_tables</code> table reference
*/
public DuckdbTables(Name alias) {
this(alias, DUCKDB_TABLES);
}
/**
* Create a <code>system.main.duckdb_tables</code> table reference
*/
public DuckdbTables() {
this(DSL.name("duckdb_tables"), null);
}
public <O extends Record> DuckdbTables(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, DUCKDB_TABLES);
}
@Override
public Schema getSchema() {
return aliased() ? null : Main.MAIN;
}
@Override
public DuckdbTables as(String alias) {
return new DuckdbTables(DSL.name(alias), this);
}
@Override
public DuckdbTables as(Name alias) {
return new DuckdbTables(alias, this);
}
@Override
public DuckdbTables as(Table<?> alias) {
return new DuckdbTables(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public DuckdbTables rename(String name) {
return new DuckdbTables(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public DuckdbTables rename(Name name) {
return new DuckdbTables(name, null);
}
/**
* Rename this table
*/
@Override
public DuckdbTables rename(Table<?> name) {
return new DuckdbTables(name.getQualifiedName(), null);
}
}

View File

@ -0,0 +1,179 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.main.tables;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DuckdbTypes extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.main.duckdb_types</code>
*/
public static final DuckdbTypes DUCKDB_TYPES = new DuckdbTypes();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.main.duckdb_types.database_name</code>.
*/
public final TableField<Record, String> DATABASE_NAME = createField(DSL.name("database_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_types.database_oid</code>.
*/
public final TableField<Record, Long> DATABASE_OID = createField(DSL.name("database_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_types.schema_name</code>.
*/
public final TableField<Record, String> SCHEMA_NAME = createField(DSL.name("schema_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_types.schema_oid</code>.
*/
public final TableField<Record, Long> SCHEMA_OID = createField(DSL.name("schema_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_types.type_oid</code>.
*/
public final TableField<Record, Long> TYPE_OID = createField(DSL.name("type_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_types.type_name</code>.
*/
public final TableField<Record, String> TYPE_NAME = createField(DSL.name("type_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_types.type_size</code>.
*/
public final TableField<Record, Long> TYPE_SIZE = createField(DSL.name("type_size"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_types.logical_type</code>.
*/
public final TableField<Record, String> LOGICAL_TYPE = createField(DSL.name("logical_type"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_types.type_category</code>.
*/
public final TableField<Record, String> TYPE_CATEGORY = createField(DSL.name("type_category"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_types.internal</code>.
*/
public final TableField<Record, Boolean> INTERNAL = createField(DSL.name("internal"), 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.
*/
@Deprecated
public final TableField<Record, Object> LABELS = createField(DSL.name("labels"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"VARCHAR[]\""), this, "");
private DuckdbTypes(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private DuckdbTypes(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.main.duckdb_types</code> table reference
*/
public DuckdbTypes(String alias) {
this(DSL.name(alias), DUCKDB_TYPES);
}
/**
* Create an aliased <code>system.main.duckdb_types</code> table reference
*/
public DuckdbTypes(Name alias) {
this(alias, DUCKDB_TYPES);
}
/**
* Create a <code>system.main.duckdb_types</code> table reference
*/
public DuckdbTypes() {
this(DSL.name("duckdb_types"), null);
}
public <O extends Record> DuckdbTypes(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, DUCKDB_TYPES);
}
@Override
public Schema getSchema() {
return aliased() ? null : Main.MAIN;
}
@Override
public DuckdbTypes as(String alias) {
return new DuckdbTypes(DSL.name(alias), this);
}
@Override
public DuckdbTypes as(Name alias) {
return new DuckdbTypes(alias, this);
}
@Override
public DuckdbTypes as(Table<?> alias) {
return new DuckdbTypes(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public DuckdbTypes rename(String name) {
return new DuckdbTypes(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public DuckdbTypes rename(Name name) {
return new DuckdbTypes(name, null);
}
/**
* Rename this table
*/
@Override
public DuckdbTypes rename(Table<?> name) {
return new DuckdbTypes(name.getQualifiedName(), null);
}
}

View File

@ -0,0 +1,168 @@
/*
* This file is generated by jOOQ.
*/
package org.jooq.meta.duckdb.system.main.tables;
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Schema;
import org.jooq.Table;
import org.jooq.TableField;
import org.jooq.TableOptions;
import org.jooq.impl.DSL;
import org.jooq.impl.SQLDataType;
import org.jooq.impl.TableImpl;
import org.jooq.meta.duckdb.system.main.Main;
/**
* This class is generated by jOOQ.
*/
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DuckdbViews extends TableImpl<Record> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>system.main.duckdb_views</code>
*/
public static final DuckdbViews DUCKDB_VIEWS = new DuckdbViews();
/**
* The class holding records for this type
*/
@Override
public Class<Record> getRecordType() {
return Record.class;
}
/**
* The column <code>system.main.duckdb_views.database_name</code>.
*/
public final TableField<Record, String> DATABASE_NAME = createField(DSL.name("database_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_views.database_oid</code>.
*/
public final TableField<Record, Long> DATABASE_OID = createField(DSL.name("database_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_views.schema_name</code>.
*/
public final TableField<Record, String> SCHEMA_NAME = createField(DSL.name("schema_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_views.schema_oid</code>.
*/
public final TableField<Record, Long> SCHEMA_OID = createField(DSL.name("schema_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_views.view_name</code>.
*/
public final TableField<Record, String> VIEW_NAME = createField(DSL.name("view_name"), SQLDataType.VARCHAR, this, "");
/**
* The column <code>system.main.duckdb_views.view_oid</code>.
*/
public final TableField<Record, Long> VIEW_OID = createField(DSL.name("view_oid"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_views.internal</code>.
*/
public final TableField<Record, Boolean> INTERNAL = createField(DSL.name("internal"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_views.temporary</code>.
*/
public final TableField<Record, Boolean> TEMPORARY = createField(DSL.name("temporary"), SQLDataType.BOOLEAN, this, "");
/**
* The column <code>system.main.duckdb_views.column_count</code>.
*/
public final TableField<Record, Long> COLUMN_COUNT = createField(DSL.name("column_count"), SQLDataType.BIGINT, this, "");
/**
* The column <code>system.main.duckdb_views.sql</code>.
*/
public final TableField<Record, String> SQL = createField(DSL.name("sql"), SQLDataType.VARCHAR, this, "");
private DuckdbViews(Name alias, Table<Record> aliased) {
this(alias, aliased, null);
}
private DuckdbViews(Name alias, Table<Record> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view());
}
/**
* Create an aliased <code>system.main.duckdb_views</code> table reference
*/
public DuckdbViews(String alias) {
this(DSL.name(alias), DUCKDB_VIEWS);
}
/**
* Create an aliased <code>system.main.duckdb_views</code> table reference
*/
public DuckdbViews(Name alias) {
this(alias, DUCKDB_VIEWS);
}
/**
* Create a <code>system.main.duckdb_views</code> table reference
*/
public DuckdbViews() {
this(DSL.name("duckdb_views"), null);
}
public <O extends Record> DuckdbViews(Table<O> child, ForeignKey<O, Record> key) {
super(child, key, DUCKDB_VIEWS);
}
@Override
public Schema getSchema() {
return aliased() ? null : Main.MAIN;
}
@Override
public DuckdbViews as(String alias) {
return new DuckdbViews(DSL.name(alias), this);
}
@Override
public DuckdbViews as(Name alias) {
return new DuckdbViews(alias, this);
}
@Override
public DuckdbViews as(Table<?> alias) {
return new DuckdbViews(alias.getQualifiedName(), this);
}
/**
* Rename this table
*/
@Override
public DuckdbViews rename(String name) {
return new DuckdbViews(DSL.name(name), null);
}
/**
* Rename this table
*/
@Override
public DuckdbViews rename(Name name) {
return new DuckdbViews(name, null);
}
/**
* Rename this table
*/
@Override
public DuckdbViews rename(Table<?> name) {
return new DuckdbViews(name.getQualifiedName(), null);
}
}

View File

@ -40,6 +40,7 @@ package org.jooq.impl;
// ...
// ...
import static org.jooq.SQLDialect.DERBY;
import static org.jooq.SQLDialect.DUCKDB;
import static org.jooq.SQLDialect.FIREBIRD;
import static org.jooq.SQLDialect.H2;
import static org.jooq.SQLDialect.HSQLDB;
@ -109,19 +110,15 @@ final class AsteriskImpl extends AbstractQueryPart implements Asterisk {
ctx.sql(' ').visit(K_EXCEPT).sql(" (").visit(fields).sql(')');
}
static final Keyword keyword(Context<?> ctx) {
switch (ctx.family()) {
case DUCKDB:
return K_EXCLUDE;
default:
return K_EXCEPT;
}
}
@Override
public final Asterisk except(String... fieldNames) {

View File

@ -75,6 +75,7 @@ import static org.jooq.SQLDialect.CUBRID;
// ...
import static org.jooq.SQLDialect.DEFAULT;
import static org.jooq.SQLDialect.DERBY;
import static org.jooq.SQLDialect.DUCKDB;
// ...
import static org.jooq.SQLDialect.FIREBIRD;
// ...
@ -337,7 +338,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
static final Set<SQLDialect> NO_SUPPORT_WINDOW_CLAUSE = SQLDialect.supportedUntil(CUBRID, DERBY, HSQLDB, IGNITE, MARIADB);
private static final Set<SQLDialect> OPTIONAL_FROM_CLAUSE = SQLDialect.supportedBy(DEFAULT, H2, IGNITE, MARIADB, MYSQL, POSTGRES, SQLITE, TRINO, YUGABYTEDB);
private static final Set<SQLDialect> OPTIONAL_FROM_CLAUSE = SQLDialect.supportedBy(DEFAULT, DUCKDB, H2, IGNITE, MARIADB, MYSQL, POSTGRES, SQLITE, TRINO, YUGABYTEDB);
private static final Set<SQLDialect> REQUIRES_DERIVED_TABLE_DML = SQLDialect.supportedUntil(MYSQL);
private static final Set<SQLDialect> NO_IMPLICIT_GROUP_BY_ON_HAVING = SQLDialect.supportedBy(SQLITE);

View File

@ -45,6 +45,7 @@ import static org.jooq.Clause.TABLE_REFERENCE;
// ...
// ...
// ...
import static org.jooq.SQLDialect.DUCKDB;
import static org.jooq.SQLDialect.FIREBIRD;
import static org.jooq.SQLDialect.HSQLDB;
// ...

View File

@ -53,6 +53,7 @@ import static org.jooq.ContextConverter.scoped;
// ...
// ...
import static org.jooq.SQLDialect.DERBY;
import static org.jooq.SQLDialect.DUCKDB;
// ...
import static org.jooq.SQLDialect.FIREBIRD;
import static org.jooq.SQLDialect.H2;
@ -5786,6 +5787,7 @@ final class Tools {
private static final void toSQLDDLTypeDeclarationDefault(Context<?> ctx, DataType<?> type) {