duckdb 1.0.0.1 → 1.1.0.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 +4 -4
- data/.github/workflows/test_on_macos.yml +15 -3
- data/.github/workflows/test_on_ubuntu.yml +15 -3
- data/.github/workflows/test_on_windows.yml +2 -2
- data/CHANGELOG.md +64 -1
- data/Dockerfile +2 -2
- data/Gemfile.lock +6 -6
- data/README.md +0 -3
- data/benchmark/async_query.rb +0 -2
- data/benchmark/to_intern_ips.rb +0 -1
- data/duckdb.gemspec +1 -1
- data/ext/duckdb/duckdb.c +4 -0
- data/ext/duckdb/extconf.rb +6 -7
- data/ext/duckdb/pending_result.c +7 -0
- data/ext/duckdb/prepared_statement.c +35 -9
- data/ext/duckdb/result.c +246 -411
- data/ext/duckdb/ruby-duckdb.h +6 -0
- data/lib/duckdb/column.rb +2 -38
- data/lib/duckdb/config.rb +47 -49
- data/lib/duckdb/connection.rb +0 -1
- data/lib/duckdb/converter/int_to_sym.rb +127 -0
- data/lib/duckdb/converter.rb +68 -0
- data/lib/duckdb/database.rb +2 -4
- data/lib/duckdb/infinity.rb +8 -0
- data/lib/duckdb/pending_result.rb +16 -5
- data/lib/duckdb/prepared_statement.rb +29 -2
- data/lib/duckdb/result.rb +39 -78
- data/lib/duckdb/version.rb +1 -1
- data/lib/duckdb.rb +1 -0
- data/sample/async_query.rb +0 -1
- data/sample/async_query_stream.rb +0 -1
- metadata +6 -7
- data/benchmark/to_bigdecimal_ips.rb +0 -16
- data/benchmark/to_hugeint_ips.rb +0 -16
- data/benchmark/to_hugeint_profile.rb +0 -26
data/sample/async_query.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: duckdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaki Suketa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bigdecimal
|
@@ -106,9 +106,6 @@ files:
|
|
106
106
|
- benchmark/async_query.rb
|
107
107
|
- benchmark/converter_hugeint_ips.rb
|
108
108
|
- benchmark/get_converter_module_ips.rb
|
109
|
-
- benchmark/to_bigdecimal_ips.rb
|
110
|
-
- benchmark/to_hugeint_ips.rb
|
111
|
-
- benchmark/to_hugeint_profile.rb
|
112
109
|
- benchmark/to_intern_ips.rb
|
113
110
|
- bin/console
|
114
111
|
- bin/setup
|
@@ -150,7 +147,9 @@ files:
|
|
150
147
|
- lib/duckdb/config.rb
|
151
148
|
- lib/duckdb/connection.rb
|
152
149
|
- lib/duckdb/converter.rb
|
150
|
+
- lib/duckdb/converter/int_to_sym.rb
|
153
151
|
- lib/duckdb/database.rb
|
152
|
+
- lib/duckdb/infinity.rb
|
154
153
|
- lib/duckdb/interval.rb
|
155
154
|
- lib/duckdb/library_version.rb
|
156
155
|
- lib/duckdb/pending_result.rb
|
@@ -174,14 +173,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
174
173
|
requirements:
|
175
174
|
- - ">="
|
176
175
|
- !ruby/object:Gem::Version
|
177
|
-
version: 3.
|
176
|
+
version: 3.1.0
|
178
177
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
178
|
requirements:
|
180
179
|
- - ">="
|
181
180
|
- !ruby/object:Gem::Version
|
182
181
|
version: '0'
|
183
182
|
requirements: []
|
184
|
-
rubygems_version: 3.5.
|
183
|
+
rubygems_version: 3.5.16
|
185
184
|
signing_key:
|
186
185
|
specification_version: 4
|
187
186
|
summary: This module is Ruby binding for DuckDB database engine.
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'duckdb'
|
5
|
-
require 'benchmark/ips'
|
6
|
-
|
7
|
-
db = DuckDB::Database.open
|
8
|
-
con = db.connect
|
9
|
-
con.query('CREATE TABLE decimals (decimal_value DECIMAL(38, 3))')
|
10
|
-
con.query('INSERT INTO decimals VALUES (1234567890123.456)')
|
11
|
-
result = con.query('SELECT decimal_value FROM decimals')
|
12
|
-
|
13
|
-
Benchmark.ips do |x|
|
14
|
-
x.report('_to_decimal') { result.send(:_to_decimal, 0, 0) }
|
15
|
-
x.report('_to_decimal_internal') { result.send(:_to_decimal_internal, 0, 0) }
|
16
|
-
end
|
data/benchmark/to_hugeint_ips.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'duckdb'
|
5
|
-
require 'benchmark/ips'
|
6
|
-
|
7
|
-
db = DuckDB::Database.open
|
8
|
-
con = db.connect
|
9
|
-
con.query('CREATE TABLE hugeints (hugeint_value HUGEINT)')
|
10
|
-
con.query('INSERT INTO hugeints VALUES (123456789012345678901234567890123456789)')
|
11
|
-
result = con.query('SELECT hugeint_value FROM hugeints')
|
12
|
-
|
13
|
-
Benchmark.ips do |x|
|
14
|
-
x.report('_to_hugeint') { result.send(:_to_hugeint, 0, 0) }
|
15
|
-
x.report('_to_hugeint_internal') { result.send(:_to_hugeint_internal, 0, 0) }
|
16
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'duckdb'
|
5
|
-
require 'stackprof'
|
6
|
-
|
7
|
-
db = DuckDB::Database.open
|
8
|
-
con = db.connect
|
9
|
-
con.query('CREATE TABLE hugeints (hugeint_value HUGEINT)')
|
10
|
-
con.query('INSERT INTO hugeints VALUES (123456789012345678901234567890123456789)')
|
11
|
-
result = con.query('SELECT hugeint_value FROM hugeints')
|
12
|
-
|
13
|
-
def profile(name, &block)
|
14
|
-
profile = StackProf.run(mode: :wall, interval: 1_000) do
|
15
|
-
2_000_000.times(&block)
|
16
|
-
end
|
17
|
-
|
18
|
-
result = StackProf::Report.new(profile)
|
19
|
-
puts
|
20
|
-
puts "=== #{name} ==="
|
21
|
-
result.print_text
|
22
|
-
puts
|
23
|
-
end
|
24
|
-
|
25
|
-
profile(:_to_hugeint) { result.send(:_to_hugeint, 0, 0) }
|
26
|
-
profile(:_to_hugeint_internal) { result.send(:_to_hugeint_internal, 0, 0) }
|