Skip to content

Implement getUDTs method#675

Merged
staticlibs merged 3 commits intoduckdb:mainfrom
staticlibs:implement-getUDTs-method
Apr 24, 2026
Merged

Implement getUDTs method#675
staticlibs merged 3 commits intoduckdb:mainfrom
staticlibs:implement-getUDTs-method

Conversation

@staticlibs
Copy link
Copy Markdown
Collaborator

This PR supersedes PR #645.

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_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.

@staticlibs staticlibs merged commit 21e5e51 into duckdb:main Apr 24, 2026
@staticlibs staticlibs deleted the implement-getUDTs-method branch April 24, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants