sequel-duckdb 0.4.1 → 0.4.2
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 +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +2 -2
- data/lib/sequel/adapters/shared/duckdb.rb +13 -2
- data/lib/sequel/duckdb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0a9b28d8489baa123698f3f417dff11cd65bb9eb6d273b525700e461f1db122
|
|
4
|
+
data.tar.gz: 32ebb1b3d38844324cdfadfa41b9f1dacf79deada7afb822ed208997f4b0d490
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: be1fc35c46854946c12fff2d39bdbd5795ade21b8bd9955cedb4b43acd103b0fca120f8337fb8c57a82ea2fcd6fd40b8e70b87d8bd523190d90991a3990a86f9
|
|
7
|
+
data.tar.gz: f65f758830cb7deabc5ba6b6492988934dc5fbb8cd8bdcec9b5a5e51905ba67e306a04a0475e09f6ec3f764486680e6941721e368ebbd57161cde82ff43fd5db
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.2] - 2026-10-27
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- The duckdb gem 1.5.x is no longer supported. Use `gem "duckdb", "~> 2.0"`. The gem
|
|
13
|
+
2.x builds against the DuckDB C library 1.4 or newer, so library 1.5.x is still
|
|
14
|
+
supported until March 2027.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **view:** Use CREATE OR REPLACE VIEW in create_or_replace_view ([2f54ca1](https://github.com/outcomesinsights/sequel-duckdb/commit/2f54ca152fccec00b02a1d044ee6eb51211942ef))
|
|
19
|
+
- **view:** Accept a mock Database's datasets as a view source ([72273ab](https://github.com/outcomesinsights/sequel-duckdb/commit/72273abe4d3e264af7b6b3b57db70c8bc45f87a7))
|
|
20
|
+
|
|
8
21
|
## [0.4.1] - 2026-10-26
|
|
9
22
|
|
|
10
23
|
### Added
|
data/README.md
CHANGED
|
@@ -807,8 +807,8 @@ db[:users].where(active: true).all
|
|
|
807
807
|
- **Sequel**: 5.0 or higher
|
|
808
808
|
- **DuckDB C library**: 1.5.x and 2.x. Support for 1.5.x ends when DuckDB 1.5.x
|
|
809
809
|
reaches end of life in March 2027.
|
|
810
|
-
- **ruby-duckdb (the `duckdb` gem)**:
|
|
811
|
-
|
|
810
|
+
- **ruby-duckdb (the `duckdb` gem)**: 2.x. sequel-duckdb does not depend on it, so add
|
|
811
|
+
`gem "duckdb", "~> 2.0"` to your own Gemfile. ruby-duckdb 2.x builds against
|
|
812
812
|
library 1.4 or newer, so it works with library 1.5.x.
|
|
813
813
|
|
|
814
814
|
DuckDB 2.x aborts an open transaction after any failed statement, including a query
|
|
@@ -643,6 +643,13 @@ module Sequel
|
|
|
643
643
|
true
|
|
644
644
|
end
|
|
645
645
|
|
|
646
|
+
# create_or_replace_view emits CREATE OR REPLACE VIEW. Without this, Sequel
|
|
647
|
+
# runs DROP VIEW first and logs its failure at ERROR, and an unqualified DROP
|
|
648
|
+
# VIEW can resolve to a view in another catalog.
|
|
649
|
+
def supports_create_or_replace_view?
|
|
650
|
+
true
|
|
651
|
+
end
|
|
652
|
+
|
|
646
653
|
# DuckDB-specific schema generation methods
|
|
647
654
|
|
|
648
655
|
# Generate SQL for primary key column
|
|
@@ -864,7 +871,9 @@ module Sequel
|
|
|
864
871
|
# @option options [Hash] :options Options for the data source (e.g., path for parquet)
|
|
865
872
|
# @return [String] CREATE VIEW SQL
|
|
866
873
|
def create_view_sql(name, source, options = OPTS)
|
|
867
|
-
|
|
874
|
+
# A Hash source holds the file options. Keep the caller's options too, such
|
|
875
|
+
# as the :replace that create_or_replace_view adds.
|
|
876
|
+
options = source.merge(options) if source.is_a?(Hash)
|
|
868
877
|
some_paths = options[:path] || options[:paths] || options.dig(:options, :path) || options.dig(:options, :paths)
|
|
869
878
|
# Handle DuckDB-specific source patterns
|
|
870
879
|
source = if options[:using] || some_paths
|
|
@@ -872,7 +881,9 @@ module Sequel
|
|
|
872
881
|
read_something_sql(some_paths, options).then do |read_stmt|
|
|
873
882
|
from(read_stmt)
|
|
874
883
|
end.sql
|
|
875
|
-
elsif source.is_a?(Dataset)
|
|
884
|
+
elsif source.is_a?(::Sequel::Dataset)
|
|
885
|
+
# Not the bare Dataset, which here means Sequel::DuckDB::Dataset and
|
|
886
|
+
# so rejects the datasets of a mock Database.
|
|
876
887
|
source.sql
|
|
877
888
|
elsif source.is_a?(String)
|
|
878
889
|
source
|