Conversation
|
Ah I know what the problem is, I had |
This is a backport of the PR duckdb#645 to `v1.5-variegata` stable branch. I ran into the fact that the getUDTs method isn't implemented when writing a [Slick extension for DuckDB](https://github.com/Algebrazebra/slick-duckdb). This implementation uses a query against `duckdb_types()` and maps the DuckDB result columns to the column names required by the JDBC interface definition: - `database_name -> TYPE_CAT` - `schema_name -> TYPE_SCHEM` - `type_name -> TYPE_NAME` - `comment -> REMARKS` - `CLASS_NAME` returned as `NULL` The types themselves are mapped to the base type when a scalar base type is available, but `STRUCT` and `UNION` don't have one so it maps to `NULL`. Co-Authored-By: Algebrazebra <Algebrazebra@users.noreply.github.com>
This is a backport of the PR #645 to `v1.5-variegata` stable branch. I ran into the fact that the getUDTs method isn't implemented when writing a [Slick extension for DuckDB](https://github.com/Algebrazebra/slick-duckdb). This implementation uses a query against `duckdb_types()` and maps the DuckDB result columns to the column names required by the JDBC interface definition: - `database_name -> TYPE_CAT` - `schema_name -> TYPE_SCHEM` - `type_name -> TYPE_NAME` - `comment -> REMARKS` - `CLASS_NAME` returned as `NULL` The types themselves are mapped to the base type when a scalar base type is available, but `STRUCT` and `UNION` don't have one so it maps to `NULL`. Co-Authored-By: Algebrazebra <Algebrazebra@users.noreply.github.com>
|
My changes were back-ported by @staticlibs and made it into the v1.5.20 release. This is why I am closing this PR. |
|
Sorry for the confusion, this PR is still useful for the |
I ran into the fact that the getUDTs method isn't implemented when writing a Slick extension for DuckDB.
This implementation uses a query against
duckdb_types()and maps the DuckDB result columns to the column names required by the JDBC interface definition:database_name -> TYPE_CATschema_name -> TYPE_SCHEMtype_name -> TYPE_NAMEcomment -> REMARKSCLASS_NAMEreturned asNULLThe types themselves are mapped to the base type when a scalar base type is available, but
STRUCTandUNIONdon't have one so it maps toNULL.