Skip to content

Added custom sqlite types support#1741

Draft
AndreiKingsley wants to merge 12 commits intomasterfrom
custom_sqlite_types
Draft

Added custom sqlite types support#1741
AndreiKingsley wants to merge 12 commits intomasterfrom
custom_sqlite_types

Conversation

@AndreiKingsley
Copy link
Collaborator

@AndreiKingsley AndreiKingsley commented Mar 12, 2026

Closes #964

get() = "org.sqlite.JDBC"

override fun getExpectedJdbcType(tableColumnMetadata: TableColumnMetadata): KType =
customTypesMap[tableColumnMetadata.sqlTypeName] ?: super.getExpectedJdbcType(tableColumnMetadata)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if sqlTypeName is enough to differentiate the right type.

Also, take nullability into account.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I believe sqlTypeName is OK.
However, we should improve this mechanism in future. This will require us to research use cases in depth.

@AndreiKingsley
Copy link
Collaborator Author

Requires #1735

@AndreiKingsley AndreiKingsley requested a review from zaleslaw March 16, 2026 13:10
@AndreiKingsley AndreiKingsley changed the title Custom sqlite types Added custom sqlite types support Mar 16, 2026
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.

ClassCast exception when reading from specific sqlite db

2 participants