duckdb 0.10.0.0 → 0.10.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test_on_macos.yml +1 -1
- data/.github/workflows/test_on_ubuntu.yml +1 -1
- data/.github/workflows/test_on_windows.yml +1 -1
- data/CHANGELOG.md +10 -2
- data/Gemfile.lock +5 -5
- data/README.md +8 -1
- data/ext/duckdb/connection.c +0 -8
- data/ext/duckdb/extconf.rb +3 -4
- data/ext/duckdb/pending_result.c +0 -9
- data/ext/duckdb/prepared_statement.c +2 -7
- data/ext/duckdb/ruby-duckdb.h +0 -4
- data/lib/duckdb/column.rb +1 -1
- data/lib/duckdb/result.rb +1 -1
- data/lib/duckdb/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d937467c3c4f50946242d38224cfd0954d17a2a5ade0a3a5b72d7611a482e45
|
4
|
+
data.tar.gz: 69ca3178c0aaeab610ee663e0a1f47f3b96f685db84f4f4816be0d142a7276c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39735bf906776ac331c4eb3daef1091dda9d70668216825b9eab4aafd82f7c667045677aba13f8438d7ff13213b3ee9c8dba8e806e20c9eec377a67ab4c1e741
|
7
|
+
data.tar.gz: b53af70bbeeea1eea3cf5f3c161faea38249dacbc1ee26b13416540818edac64632f07a3af67cd9c79457c2c5aad85abb4183f878c97c5cbdd48b87adbf0e5ed
|
data/CHANGELOG.md
CHANGED
@@ -4,15 +4,23 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
## Unreleased
|
6
6
|
|
7
|
+
# 0.10.1.1 - 2024-03-31
|
8
|
+
- fix error using binding with name (issue #612).
|
9
|
+
Thanks to pere73.
|
10
|
+
|
11
|
+
# 0.10.1.0 - 2024-03-22
|
12
|
+
- drop duckdb v0.8.x.
|
13
|
+
- fix column type failures with duckdb v0.10.1.
|
14
|
+
|
7
15
|
# 0.10.0.0 - 2024-02-18
|
8
|
-
- bump to duckdb
|
16
|
+
- bump to duckdb v0.10.0.
|
9
17
|
- fix building error with duckdb v0.10.0.
|
10
18
|
- bundle update to bump nokogiri from 1.16.0 to 1.16.2.
|
11
19
|
- fix Decimal type conversion.
|
12
20
|
|
13
21
|
## Breaking changes
|
14
22
|
|
15
|
-
- `DuckDB::Connection#query_progress` returns `DuckDB::QueryProgress` object only when duckdb library version is 0.10.0.
|
23
|
+
- `DuckDB::Connection#query_progress` returns `DuckDB::QueryProgress` object only when duckdb library version is 0.10.0 or later.
|
16
24
|
- The available methods are `DuckDB::QueryProgress#percentage`, `DuckDB::QueryProgress#rows_processed`, `DuckDB::QueryProgress#total_rows_to_process`.
|
17
25
|
|
18
26
|
# 0.9.2.3 - 2023-12-29
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
duckdb (0.10.
|
4
|
+
duckdb (0.10.1.1)
|
5
5
|
bigdecimal (>= 3.1.4)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
10
|
benchmark-ips (2.13.0)
|
11
|
-
bigdecimal (3.1.
|
11
|
+
bigdecimal (3.1.7)
|
12
12
|
mini_portile2 (2.8.5)
|
13
|
-
minitest (5.22.
|
14
|
-
nokogiri (1.16.
|
13
|
+
minitest (5.22.3)
|
14
|
+
nokogiri (1.16.3)
|
15
15
|
mini_portile2 (~> 2.8.2)
|
16
16
|
racc (~> 1.4)
|
17
|
-
nokogiri (1.16.
|
17
|
+
nokogiri (1.16.3-x86_64-linux)
|
18
18
|
racc (~> 1.4)
|
19
19
|
racc (1.7.3)
|
20
20
|
rake (13.1.0)
|
data/README.md
CHANGED
@@ -42,6 +42,13 @@ Using `brew install` is recommended.
|
|
42
42
|
brew install duckdb
|
43
43
|
```
|
44
44
|
|
45
|
+
## Pre-requisite setup (Windows):
|
46
|
+
|
47
|
+
Using [Ruby + Devkit](https://rubyinstaller.org/downloads/) is recommended.
|
48
|
+
|
49
|
+
1. Download libduckdb-windows-amd64.zip from [DuckDB](https://github.com/duckdb/duckdb/releases) and extranct it.
|
50
|
+
2. Copy `duckdb.dll` into `C:\Windows\System32`
|
51
|
+
|
45
52
|
## How to install
|
46
53
|
|
47
54
|
```sh
|
@@ -50,7 +57,7 @@ gem install duckdb
|
|
50
57
|
|
51
58
|
After you've run the above pre-requisite setup, this should work fine.
|
52
59
|
|
53
|
-
If it doesn't, you may
|
60
|
+
If it doesn't, you may have to specify the location of the C header and library files:
|
54
61
|
|
55
62
|
```sh
|
56
63
|
gem install duckdb -- --with-duckdb-include=/duckdb_header_directory --with-duckdb-lib=/duckdb_library_directory
|
data/ext/duckdb/connection.c
CHANGED
@@ -6,12 +6,8 @@ static void deallocate(void *ctx);
|
|
6
6
|
static VALUE allocate(VALUE klass);
|
7
7
|
static size_t memsize(const void *p);
|
8
8
|
static VALUE duckdb_connection_disconnect(VALUE self);
|
9
|
-
|
10
|
-
#ifdef HAVE_DUCKDB_H_GE_V090
|
11
9
|
static VALUE duckdb_connection_interrupt(VALUE self);
|
12
10
|
static VALUE duckdb_connection_query_progress(VALUE self);
|
13
|
-
#endif
|
14
|
-
|
15
11
|
static VALUE duckdb_connection_connect(VALUE self, VALUE oDuckDBDatabase);
|
16
12
|
static VALUE duckdb_connection_query_sql(VALUE self, VALUE str);
|
17
13
|
|
@@ -69,7 +65,6 @@ static VALUE duckdb_connection_disconnect(VALUE self) {
|
|
69
65
|
return self;
|
70
66
|
}
|
71
67
|
|
72
|
-
#ifdef HAVE_DUCKDB_H_GE_V090
|
73
68
|
/*
|
74
69
|
* call-seq:
|
75
70
|
* connection.interrupt -> nil
|
@@ -126,7 +121,6 @@ static VALUE duckdb_connection_query_progress(VALUE self) {
|
|
126
121
|
return DBL2NUM(progress);
|
127
122
|
#endif
|
128
123
|
}
|
129
|
-
#endif
|
130
124
|
|
131
125
|
static VALUE duckdb_connection_connect(VALUE self, VALUE oDuckDBDatabase) {
|
132
126
|
rubyDuckDBConnection *ctx;
|
@@ -169,10 +163,8 @@ void rbduckdb_init_duckdb_connection(void) {
|
|
169
163
|
rb_define_alloc_func(cDuckDBConnection, allocate);
|
170
164
|
|
171
165
|
rb_define_method(cDuckDBConnection, "disconnect", duckdb_connection_disconnect, 0);
|
172
|
-
#ifdef HAVE_DUCKDB_H_GE_V090
|
173
166
|
rb_define_method(cDuckDBConnection, "interrupt", duckdb_connection_interrupt, 0);
|
174
167
|
rb_define_method(cDuckDBConnection, "query_progress", duckdb_connection_query_progress, 0);
|
175
|
-
#endif
|
176
168
|
rb_define_private_method(cDuckDBConnection, "_connect", duckdb_connection_connect, 1);
|
177
169
|
rb_define_private_method(cDuckDBConnection, "query_sql", duckdb_connection_query_sql, 1);
|
178
170
|
}
|
data/ext/duckdb/extconf.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'mkmf'
|
4
4
|
|
5
|
-
DUCKDB_REQUIRED_VERSION = '0.
|
5
|
+
DUCKDB_REQUIRED_VERSION = '0.9.0'
|
6
6
|
|
7
7
|
def check_duckdb_header(header, version)
|
8
8
|
found = find_header(
|
@@ -26,6 +26,7 @@ def check_duckdb_library(library, func, version)
|
|
26
26
|
'/opt/homebrew/opt/duckdb/lib',
|
27
27
|
'/opt/local/lib'
|
28
28
|
)
|
29
|
+
have_func(func, 'duckdb.h')
|
29
30
|
return if found
|
30
31
|
|
31
32
|
library_name = duckdb_library_name(library)
|
@@ -51,9 +52,7 @@ end
|
|
51
52
|
dir_config('duckdb')
|
52
53
|
|
53
54
|
check_duckdb_header('duckdb.h', DUCKDB_REQUIRED_VERSION)
|
54
|
-
|
55
|
-
# check duckdb >= 0.8.0
|
56
|
-
check_duckdb_library('duckdb', 'duckdb_string_is_inlined', DUCKDB_REQUIRED_VERSION)
|
55
|
+
check_duckdb_library('duckdb', 'duckdb_bind_parameter_index', DUCKDB_REQUIRED_VERSION)
|
57
56
|
|
58
57
|
# check duckdb >= 0.9.0
|
59
58
|
have_func('duckdb_bind_parameter_index', 'duckdb.h')
|
data/ext/duckdb/pending_result.c
CHANGED
@@ -8,11 +8,7 @@ static size_t memsize(const void *p);
|
|
8
8
|
static VALUE duckdb_pending_result_initialize(int argc, VALUE *args, VALUE self);
|
9
9
|
static VALUE duckdb_pending_result_execute_task(VALUE self);
|
10
10
|
static VALUE duckdb_pending_result_execute_pending(VALUE self);
|
11
|
-
|
12
|
-
#ifdef HAVE_DUCKDB_H_GE_V090
|
13
11
|
static VALUE duckdb_pending_result_execution_finished_p(VALUE self);
|
14
|
-
#endif
|
15
|
-
|
16
12
|
static VALUE duckdb_pending_result__state(VALUE self);
|
17
13
|
|
18
14
|
static const rb_data_type_t pending_result_data_type = {
|
@@ -81,12 +77,10 @@ static VALUE duckdb_pending_result_execute_task(VALUE self) {
|
|
81
77
|
return Qnil;
|
82
78
|
}
|
83
79
|
|
84
|
-
#ifdef HAVE_DUCKDB_H_GE_V090
|
85
80
|
static VALUE duckdb_pending_result_execution_finished_p(VALUE self) {
|
86
81
|
rubyDuckDBPendingResult *ctx = get_struct_pending_result(self);
|
87
82
|
return duckdb_pending_execution_is_finished(ctx->state) ? Qtrue : Qfalse;
|
88
83
|
}
|
89
|
-
#endif
|
90
84
|
|
91
85
|
/*
|
92
86
|
* call-seq:
|
@@ -131,9 +125,6 @@ void rbduckdb_init_duckdb_pending_result(void) {
|
|
131
125
|
rb_define_method(cDuckDBPendingResult, "initialize", duckdb_pending_result_initialize, -1);
|
132
126
|
rb_define_method(cDuckDBPendingResult, "execute_task", duckdb_pending_result_execute_task, 0);
|
133
127
|
rb_define_method(cDuckDBPendingResult, "execute_pending", duckdb_pending_result_execute_pending, 0);
|
134
|
-
|
135
|
-
#ifdef HAVE_DUCKDB_H_GE_V090
|
136
128
|
rb_define_method(cDuckDBPendingResult, "execution_finished?", duckdb_pending_result_execution_finished_p, 0);
|
137
|
-
#endif
|
138
129
|
rb_define_private_method(cDuckDBPendingResult, "_state", duckdb_pending_result__state, 0);
|
139
130
|
}
|
@@ -10,12 +10,10 @@ static VALUE duckdb_prepared_statement_nparams(VALUE self);
|
|
10
10
|
static VALUE duckdb_prepared_statement_execute(VALUE self);
|
11
11
|
static idx_t check_index(VALUE vidx);
|
12
12
|
|
13
|
-
#ifdef HAVE_DUCKDB_H_GE_V090
|
14
13
|
static VALUE duckdb_prepared_statement_bind_parameter_index(VALUE self, VALUE name);
|
15
14
|
#ifdef HAVE_DUCKDB_PARAMETER_NAME
|
16
15
|
static VALUE duckdb_prepared_statement_parameter_name(VALUE self, VALUE vidx);
|
17
16
|
#endif
|
18
|
-
#endif
|
19
17
|
|
20
18
|
static VALUE duckdb_prepared_statement_bind_bool(VALUE self, VALUE vidx, VALUE val);
|
21
19
|
static VALUE duckdb_prepared_statement_bind_int8(VALUE self, VALUE vidx, VALUE val);
|
@@ -101,7 +99,6 @@ static idx_t check_index(VALUE vidx) {
|
|
101
99
|
return idx;
|
102
100
|
}
|
103
101
|
|
104
|
-
#ifdef HAVE_DUCKDB_H_GE_V090
|
105
102
|
static VALUE duckdb_prepared_statement_bind_parameter_index(VALUE self, VALUE name) {
|
106
103
|
rubyDuckDBPreparedStatement *ctx;
|
107
104
|
idx_t idx;
|
@@ -132,7 +129,6 @@ static VALUE duckdb_prepared_statement_parameter_name(VALUE self, VALUE vidx) {
|
|
132
129
|
return vname;
|
133
130
|
}
|
134
131
|
#endif /* HAVE_DUCKDB_PARAMETER_NAME */
|
135
|
-
#endif /* HAVE_DUCKDB_H_GE_V090 */
|
136
132
|
|
137
133
|
static VALUE duckdb_prepared_statement_bind_bool(VALUE self, VALUE vidx, VALUE val) {
|
138
134
|
rubyDuckDBPreparedStatement *ctx;
|
@@ -355,13 +351,12 @@ void rbduckdb_init_duckdb_prepared_statement(void) {
|
|
355
351
|
rb_define_method(cDuckDBPreparedStatement, "initialize", duckdb_prepared_statement_initialize, 2);
|
356
352
|
rb_define_method(cDuckDBPreparedStatement, "execute", duckdb_prepared_statement_execute, 0);
|
357
353
|
rb_define_method(cDuckDBPreparedStatement, "nparams", duckdb_prepared_statement_nparams, 0);
|
358
|
-
|
359
|
-
#ifdef HAVE_DUCKDB_H_GE_V090
|
360
354
|
rb_define_method(cDuckDBPreparedStatement, "bind_parameter_index", duckdb_prepared_statement_bind_parameter_index, 1);
|
355
|
+
|
361
356
|
#ifdef HAVE_DUCKDB_PARAMETER_NAME
|
362
357
|
rb_define_method(cDuckDBPreparedStatement, "parameter_name", duckdb_prepared_statement_parameter_name, 1);
|
363
358
|
#endif
|
364
|
-
|
359
|
+
|
365
360
|
rb_define_method(cDuckDBPreparedStatement, "bind_bool", duckdb_prepared_statement_bind_bool, 2);
|
366
361
|
rb_define_method(cDuckDBPreparedStatement, "bind_int8", duckdb_prepared_statement_bind_int8, 2);
|
367
362
|
rb_define_method(cDuckDBPreparedStatement, "bind_int16", duckdb_prepared_statement_bind_int16, 2);
|
data/ext/duckdb/ruby-duckdb.h
CHANGED
data/lib/duckdb/column.rb
CHANGED
data/lib/duckdb/result.rb
CHANGED
@@ -24,7 +24,7 @@ module DuckDB
|
|
24
24
|
# end
|
25
25
|
class Result
|
26
26
|
include Enumerable
|
27
|
-
TO_METHODS = if Gem::Version.new(DuckDB::LIBRARY_VERSION)
|
27
|
+
TO_METHODS = if Gem::Version.new(DuckDB::LIBRARY_VERSION) == Gem::Version.new('0.10.0')
|
28
28
|
Hash.new(:_to_string).merge(
|
29
29
|
1 => :_to_boolean,
|
30
30
|
3 => :_to_smallint,
|
data/lib/duckdb/version.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: 0.10.
|
4
|
+
version: 0.10.1.1
|
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-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bigdecimal
|