chore: upgrade GORM and database drivers#1262
Open
zhangzhenghao wants to merge 9 commits intogorse-io:masterfrom
Open
chore: upgrade GORM and database drivers#1262zhangzhenghao wants to merge 9 commits intogorse-io:masterfrom
zhangzhenghao wants to merge 9 commits intogorse-io:masterfrom
Conversation
205ee25 to
6a6ac6c
Compare
- gorm.io/gorm: v1.23.6 -> v1.31.1 - gorm.io/driver/mysql: v1.3.4 -> v1.6.0 - gorm.io/driver/postgres: v1.3.5 -> v1.6.0 - gorm.io/driver/sqlite: v1.3.4 -> v1.6.0 - gorm.io/driver/clickhouse: v0.4.2 -> v0.7.0 - Updated clickhouse fork to latest version (ab309f5) with gorm v1.30.0 - Updated sqlite fork to latest version (eb865ec) with modernc.org/sqlite - Build verified successfully
6a6ac6c to
27ccd07
Compare
Empty RecommendConfig{} causes CacheSize=0, which triggers
LIMIT 0 in SQLite fork and returns empty result sets.
govet's inline check reports false positives for generic functions where type parameter inference is not yet supported.
lib/pq driver has compatibility issues with new GORM versions, causing 'pq: got 2 parameters but the statement requires 1' errors. Changes: - Replace lib/pq driver with pgx/v5/stdlib - Update otelsql.Open calls from 'postgres' to 'pgx' - Update test files to use pgx driver pq.StringArray type is kept for PostgreSQL array handling.
- Replace lib/pq driver with pgx/v5/stdlib - Add timezone=UTC parameter to PostgreSQL URIs - pq.StringArray type kept for PostgreSQL array handling lib/pq has compatibility issues with new GORM versions causing 'pq: got 2 parameters but the statement requires 1' errors. Note: pgx stdlib mode interprets timestamp without time zone in local timezone. Tests may pass in UTC CI environments.
Timezone handling was incorrectly added to MySQL, ClickHouse and SQLite Register functions where it modified 'path' but was never used. Only PostgreSQL Register needs timezone handling for pgx.
GORM PostgreSQL driver expects 'time_zone' or 'TimeZone' parameter for proper timezone handling. Changed from lowercase 'timezone' to 'time_zone' in all PostgreSQL URI construction.
8ec24c3 to
cbb612e
Compare
- Replace otelsql.Open with stdlib.OpenDB from pgx config - Set RuntimeParams['timezone'] = 'UTC' for proper timestamp handling - Note: Local timezone tests may fail; CI (UTC) should pass
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.
Changes
Upgraded GORM and database drivers to latest versions:
Notes
Benefits