fix: correct wire protocol type OIDs for pre-existing SQLite tables (#68)#74
Merged
fix: correct wire protocol type OIDs for pre-existing SQLite tables (#68)#74
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add PRAGMA table_info fallback for type inference in the extended protocol's Parse-time schema_types, Execute-time schema_types, and Parse-time inferred_types paths. Skip empty and default-text types from PRAGMA to preserve value-based inference for untyped columns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sqlite_type_to_pg_type_namehelper to map SQLite declared types to PostgreSQL type name stringsget_column_types_from_pragmamethod to DbHandler that usesPRAGMA table_infoas a fallback for tables without__pgsqlite_schemametadataFixes #68 — integer, bigint, smallint, boolean, and float columns in pre-existing SQLite tables now report correct OIDs instead of always returning OID 25 (TEXT).
Test plan
cargo check— no errorscargo clippy— no new warnings in changed files🤖 Generated with Claude Code