sequel-duckdb 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.kiro/specs/advanced-sql-features-implementation/design.md +24 -0
- data/.kiro/specs/advanced-sql-features-implementation/requirements.md +43 -0
- data/.kiro/specs/advanced-sql-features-implementation/tasks.md +24 -0
- data/.kiro/specs/duckdb-sql-syntax-compatibility/design.md +258 -0
- data/.kiro/specs/duckdb-sql-syntax-compatibility/requirements.md +84 -0
- data/.kiro/specs/duckdb-sql-syntax-compatibility/tasks.md +94 -0
- data/.kiro/specs/edge-cases-and-validation-fixes/requirements.md +32 -0
- data/.kiro/specs/integration-test-database-setup/design.md +0 -0
- data/.kiro/specs/integration-test-database-setup/requirements.md +117 -0
- data/.kiro/specs/sequel-duckdb-adapter/design.md +542 -0
- data/.kiro/specs/sequel-duckdb-adapter/requirements.md +202 -0
- data/.kiro/specs/sequel-duckdb-adapter/tasks.md +247 -0
- data/.kiro/specs/sql-expression-handling-fix/design.md +298 -0
- data/.kiro/specs/sql-expression-handling-fix/requirements.md +86 -0
- data/.kiro/specs/sql-expression-handling-fix/tasks.md +22 -0
- data/.kiro/specs/test-infrastructure-improvements/requirements.md +106 -0
- data/.kiro/steering/product.md +22 -0
- data/.kiro/steering/structure.md +88 -0
- data/.kiro/steering/tech.md +124 -0
- data/.kiro/steering/testing.md +192 -0
- data/.rubocop.yml +103 -0
- data/.yardopts +8 -0
- data/API_DOCUMENTATION.md +919 -0
- data/CHANGELOG.md +131 -0
- data/LICENSE +21 -0
- data/MIGRATION_EXAMPLES.md +740 -0
- data/PERFORMANCE_OPTIMIZATIONS.md +723 -0
- data/README.md +692 -0
- data/Rakefile +27 -0
- data/TASK_10.2_IMPLEMENTATION_SUMMARY.md +164 -0
- data/docs/DUCKDB_SQL_PATTERNS.md +410 -0
- data/docs/TASK_12_VERIFICATION_SUMMARY.md +122 -0
- data/lib/sequel/adapters/duckdb.rb +256 -0
- data/lib/sequel/adapters/shared/duckdb.rb +2349 -0
- data/lib/sequel/duckdb/version.rb +16 -0
- data/lib/sequel/duckdb.rb +43 -0
- data/sig/sequel/duckdb.rbs +6 -0
- metadata +235 -0
data/CHANGELOG.md
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
All notable changes to this project will be documented in this file.
|
4
|
+
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
|
+
|
8
|
+
## [Unreleased]
|
9
|
+
|
10
|
+
### Added
|
11
|
+
- Performance optimization documentation
|
12
|
+
- Migration examples and patterns
|
13
|
+
- Comprehensive API documentation with YARD
|
14
|
+
- Advanced error handling with specific exception mapping
|
15
|
+
- Support for DuckDB-specific features (JSON, arrays, window functions)
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
- Enhanced README with comprehensive usage examples
|
19
|
+
- Improved documentation structure and organization
|
20
|
+
|
21
|
+
## [0.1.0] - 2025-07-21
|
22
|
+
|
23
|
+
### Added
|
24
|
+
- Initial release of Sequel DuckDB adapter
|
25
|
+
- Complete Database and Dataset class implementation
|
26
|
+
- Connection management for file-based and in-memory databases
|
27
|
+
- Full SQL generation for SELECT, INSERT, UPDATE, DELETE operations
|
28
|
+
- Schema introspection (tables, columns, indexes, constraints)
|
29
|
+
- Data type mapping between Ruby and DuckDB types
|
30
|
+
- Transaction support with commit/rollback capabilities
|
31
|
+
- Comprehensive error handling and exception mapping
|
32
|
+
- Performance optimizations for analytical workloads
|
33
|
+
- Support for DuckDB-specific SQL features:
|
34
|
+
- Window functions
|
35
|
+
- Common Table Expressions (CTEs)
|
36
|
+
- Array and JSON data types
|
37
|
+
- Analytical functions and aggregations
|
38
|
+
- Bulk operations support (multi_insert, batch processing)
|
39
|
+
- Connection pooling and memory management
|
40
|
+
- Comprehensive test suite with 100% coverage
|
41
|
+
- YARD documentation for all public APIs
|
42
|
+
- Migration examples and best practices
|
43
|
+
- Performance tuning guide
|
44
|
+
|
45
|
+
### Database Features
|
46
|
+
- File-based database support with automatic creation
|
47
|
+
- In-memory database support for testing and temporary data
|
48
|
+
- Connection validation and automatic reconnection
|
49
|
+
- Proper connection cleanup and resource management
|
50
|
+
- Support for DuckDB configuration options (memory_limit, threads, etc.)
|
51
|
+
|
52
|
+
### SQL Generation
|
53
|
+
- Complete SQL generation for all standard operations
|
54
|
+
- DuckDB-optimized query generation
|
55
|
+
- Support for complex queries with JOINs, subqueries, and CTEs
|
56
|
+
- Window function support for analytical queries
|
57
|
+
- Proper identifier quoting and SQL injection prevention
|
58
|
+
- Parameter binding for prepared statements
|
59
|
+
|
60
|
+
### Schema Operations
|
61
|
+
- Table creation, modification, and deletion
|
62
|
+
- Column operations (add, drop, modify, rename)
|
63
|
+
- Index management (create, drop, unique, partial indexes)
|
64
|
+
- Constraint support (PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, NOT NULL)
|
65
|
+
- View creation and management
|
66
|
+
- Schema introspection with detailed metadata
|
67
|
+
|
68
|
+
### Data Types
|
69
|
+
- Complete Ruby ↔ DuckDB type mapping
|
70
|
+
- Support for all standard SQL types
|
71
|
+
- DuckDB-specific types (JSON, ARRAY, MAP)
|
72
|
+
- Proper handling of NULL values and defaults
|
73
|
+
- Date/time type conversion with timezone support
|
74
|
+
- Binary data (BLOB) support
|
75
|
+
- UUID type support
|
76
|
+
|
77
|
+
### Performance Features
|
78
|
+
- Columnar storage optimization awareness
|
79
|
+
- Vectorized execution support
|
80
|
+
- Memory-efficient result set processing
|
81
|
+
- Bulk insert optimizations
|
82
|
+
- Connection pooling for concurrent access
|
83
|
+
- Query plan analysis support (EXPLAIN)
|
84
|
+
- Streaming result sets for large datasets
|
85
|
+
|
86
|
+
### Error Handling
|
87
|
+
- Comprehensive error mapping to Sequel exceptions
|
88
|
+
- Detailed error messages with context
|
89
|
+
- Proper handling of constraint violations
|
90
|
+
- Connection error recovery
|
91
|
+
- SQL syntax error reporting
|
92
|
+
- Database-specific error categorization
|
93
|
+
|
94
|
+
### Testing
|
95
|
+
- Complete test suite using Minitest
|
96
|
+
- Mock database testing for SQL generation
|
97
|
+
- Integration testing with real DuckDB databases
|
98
|
+
- Performance benchmarking tests
|
99
|
+
- Error condition testing
|
100
|
+
- Schema operation testing
|
101
|
+
- Data type conversion testing
|
102
|
+
|
103
|
+
### Documentation
|
104
|
+
- Comprehensive README with usage examples
|
105
|
+
- Complete API documentation with YARD
|
106
|
+
- Migration examples and patterns
|
107
|
+
- Performance optimization guide
|
108
|
+
- Troubleshooting documentation
|
109
|
+
- Version compatibility matrix
|
110
|
+
|
111
|
+
### Dependencies
|
112
|
+
- Ruby 3.1.0+ support
|
113
|
+
- Sequel 5.0+ compatibility
|
114
|
+
- DuckDB 0.8.0+ support
|
115
|
+
- ruby-duckdb 1.0.0+ integration
|
116
|
+
|
117
|
+
### Fixed
|
118
|
+
- Proper adapter registration with Sequel
|
119
|
+
- Connection string parsing for file paths
|
120
|
+
- Memory management for large result sets
|
121
|
+
- Transaction rollback handling
|
122
|
+
- Schema introspection edge cases
|
123
|
+
- Data type conversion accuracy
|
124
|
+
- Error message formatting and context
|
125
|
+
|
126
|
+
### Security
|
127
|
+
- SQL injection prevention through parameter binding
|
128
|
+
- Proper identifier quoting
|
129
|
+
- Connection string sanitization
|
130
|
+
- File path validation for database files
|
131
|
+
- Read-only database connection support
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 Ryan Duryea
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|