Skip to content

Commit 2b1f928

Browse files
committed
Release v0.1.1: Fix db.DB() method access and cleanup
### Critical Fixes - Fix db.DB() method access by implementing GetDBConnector() interface - Resolve 'sql: unknown driver duckdb' error with proper import - Clean up package conflicts and remove test files causing issues ### Improvements - Enhanced connection pool wrapper for proper *sql.DB access - Updated CHANGELOG.md with detailed fix documentation - Improved repository hygiene and structure This release ensures full GORM compatibility and proper access to underlying database connection pool management.
1 parent 57ea8fa commit 2b1f928

File tree

3 files changed

+32
-88
lines changed

3 files changed

+32
-88
lines changed

CHANGELOG.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,34 @@ All notable changes to the GORM DuckDB driver will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.1] - 2025-06-22
9+
10+
### Fixed
11+
12+
- **Critical**: Fixed `db.DB()` method access issue by implementing `GetDBConnector()` interface in connection wrapper
13+
- Resolved "sql: unknown driver duckdb" error by adding proper DuckDB driver import
14+
- Cleaned up package conflicts and removed large binary files from repository
15+
- Updated `.gitignore` to prevent future binary commits
16+
17+
### Changed
18+
19+
- Improved connection pool wrapper to properly expose underlying `*sql.DB` instance
20+
- Enhanced example application with DB access testing
21+
- Updated import paths in example to use correct module reference
22+
23+
### Technical Details
24+
25+
The `duckdbConnPoolWrapper` now properly implements the interface needed for GORM to access the underlying `*sql.DB` through the `db.DB()` method. This enables:
26+
27+
- Connection pool configuration (`SetMaxIdleConns`, `SetMaxOpenConns`)
28+
- Database monitoring (`db.DB().Stats()`)
29+
- Health checks (`db.DB().Ping()`)
30+
- All other standard `*sql.DB` operations
31+
832
## [0.1.0] - 2025-06-22
933

1034
### Added
35+
1136
- Initial implementation of GORM DuckDB driver
1237
- Full GORM interface compliance
1338
- Support for all standard CRUD operations
@@ -24,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2449
- Documentation and examples
2550

2651
### Features
52+
2753
- **Dialector**: Complete implementation of GORM dialector interface
2854
- **Migrator**: Full migrator implementation with all migration operations
2955
- **Data Types**: Comprehensive mapping between Go and DuckDB types
@@ -34,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3460
- **Raw SQL**: Full support for raw SQL queries and execution
3561

3662
### Data Type Support
63+
3764
- Boolean values (BOOLEAN)
3865
- Integer types (TINYINT, SMALLINT, INTEGER, BIGINT)
3966
- Unsigned integer types (UTINYINT, USMALLINT, UINTEGER, UBIGINT)
@@ -43,27 +70,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4370
- Binary data (BLOB)
4471

4572
### Migration Operations
73+
4674
- Table creation, dropping, and existence checking
4775
- Column addition, dropping, modification, and renaming
4876
- Index creation, dropping, and management
4977
- Constraint creation, dropping, and verification
5078
- Auto-migration with smart column type detection
5179

5280
### Testing
81+
5382
- Comprehensive unit tests for all functionality
5483
- Integration tests with real DuckDB database
5584
- Data type mapping verification
5685
- Migration operation testing
5786
- CRUD operation validation
5887

5988
### Documentation
89+
6090
- Complete README with usage examples
6191
- API documentation for all public methods
6292
- Migration guide and best practices
6393
- Performance considerations and notes
6494
- Example application demonstrating all features
6595

6696
### Compatibility
97+
6798
- GORM v1.25.x compatibility
6899
- Go 1.18+ support
69100
- DuckDB latest stable version support
@@ -72,6 +103,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
72103
## [Unreleased]
73104

74105
### Planned Features
106+
75107
- Enhanced error messages and debugging
76108
- Performance optimizations
77109
- Additional DuckDB-specific features

test/db_access_test.go

Lines changed: 0 additions & 61 deletions
This file was deleted.

test_db.go

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)