duckdb 0.2.6.1 → 0.2.7.0
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_ubuntu.yml +14 -14
- data/.github/workflows/test_on_windows.yml +37 -0
- data/.travis.yml +3 -3
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +1 -1
- data/README.md +0 -4
- data/ext/duckdb/extconf.rb +1 -0
- data/ext/duckdb/result.c +22 -5
- data/lib/duckdb/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 309d9f5ae00645a93cd5bf8bd706f12391e1386336516d172e1963b963df5ab4
|
4
|
+
data.tar.gz: 8814748ae38a1b501d21b69f47b262124771ddc382dfcdbba3d7b3b88b3cb691
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96d87f3dfa1e8366e98a0a93e1f6506508c885131eb4287ec2463eea8040fb1cc87436a10871cecb83b524d97173443d9b1c42330a5f311c210ffb921b64a7d9
|
7
|
+
data.tar.gz: fed84bbde6a9c6b696e9a52bf769810788b7b49d845ddca065cafcfc535540d62127d395524ca4fee86cfba9213c82fe74204063ea674d14498d7f82f0c34e33
|
@@ -9,7 +9,7 @@ jobs:
|
|
9
9
|
strategy:
|
10
10
|
matrix:
|
11
11
|
ruby: ['2.5.8', '2.6.7', '2.7.3', '3.0.1', 'head']
|
12
|
-
duckdb: ['0.2.6', '0.2.
|
12
|
+
duckdb: ['0.2.6', '0.2.7']
|
13
13
|
|
14
14
|
steps:
|
15
15
|
- uses: actions/checkout@v2
|
@@ -28,14 +28,14 @@ jobs:
|
|
28
28
|
restore-keys: |
|
29
29
|
${{ runner.os }}-duckdb-v0_2_6
|
30
30
|
|
31
|
-
- name: duckdb 0.2.
|
32
|
-
id: duckdb-cache-
|
31
|
+
- name: duckdb 0.2.7 cache
|
32
|
+
id: duckdb-cache-v0_2_7
|
33
33
|
uses: actions/cache@v1.1.0
|
34
34
|
with:
|
35
|
-
path: duckdb-v0.2.
|
36
|
-
key: ${{ runner.os }}-duckdb-
|
35
|
+
path: duckdb-v0.2.7
|
36
|
+
key: ${{ runner.os }}-duckdb-v0_2_7_001
|
37
37
|
restore-keys: |
|
38
|
-
${{ runner.os }}-duckdb-
|
38
|
+
${{ runner.os }}-duckdb-v0_2_7
|
39
39
|
|
40
40
|
- name: Build duckdb 0.2.6
|
41
41
|
if: steps.duckdb-cache-v0_2_6.outputs.cache-hit != 'true'
|
@@ -47,15 +47,15 @@ jobs:
|
|
47
47
|
cp -rip duckdb-tmp-v0.2.6/build/release/src/*.so duckdb-v0.2.6/build/release/src
|
48
48
|
cp -rip duckdb-tmp-v0.2.6/src/include duckdb-v0.2.6/src/
|
49
49
|
|
50
|
-
- name: Build duckdb 0.2.
|
51
|
-
if: steps.duckdb-cache-
|
50
|
+
- name: Build duckdb 0.2.7
|
51
|
+
if: steps.duckdb-cache-v0_2_7.outputs.cache-hit != 'true'
|
52
52
|
run: |
|
53
|
-
git clone -b v0.2.
|
54
|
-
cd duckdb-tmp-v0.2.
|
55
|
-
rm -rf duckdb-v0.2.
|
56
|
-
mkdir -p duckdb-v0.2.
|
57
|
-
cp -rip duckdb-tmp-v0.2.
|
58
|
-
cp -rip duckdb-tmp-v0.2.
|
53
|
+
git clone -b v0.2.7 https://github.com/cwida/duckdb.git duckdb-tmp-v0.2.7
|
54
|
+
cd duckdb-tmp-v0.2.7 && make && cd ..
|
55
|
+
rm -rf duckdb-v0.2.7
|
56
|
+
mkdir -p duckdb-v0.2.7/build/release/src duckdb-v0.2.7/src
|
57
|
+
cp -rip duckdb-tmp-v0.2.7/build/release/src/*.so duckdb-v0.2.7/build/release/src
|
58
|
+
cp -rip duckdb-tmp-v0.2.7/src/include duckdb-v0.2.7/src/
|
59
59
|
|
60
60
|
- name: Build and test with Rake with Ruby ${{ matrix.ruby }}
|
61
61
|
env:
|
@@ -0,0 +1,37 @@
|
|
1
|
+
name: Windows
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: windows-latest
|
8
|
+
strategy:
|
9
|
+
matrix:
|
10
|
+
ruby: ['2.5.8', '2.6.7', '2.7.3', '3.0.1', 'head']
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
|
15
|
+
- name: Set up Ruby
|
16
|
+
uses: ruby/setup-ruby@v1
|
17
|
+
with:
|
18
|
+
ruby-version: ${{ matrix.ruby }}
|
19
|
+
|
20
|
+
- name: download duckdb binary for windows 64bit
|
21
|
+
run: |
|
22
|
+
curl -OL https://github.com/duckdb/duckdb/releases/download/v0.2.6/libduckdb-windows-amd64.zip
|
23
|
+
|
24
|
+
- name: extract zip file
|
25
|
+
run: |
|
26
|
+
7z x libduckdb-windows-amd64.zip
|
27
|
+
|
28
|
+
- name: Build with Rake with Ruby ${{ matrix.ruby }}
|
29
|
+
run: |
|
30
|
+
bundle install
|
31
|
+
bundle exec rake build -- --with-duckdb-include=../../../.. --with-duckdb-lib=../../../..
|
32
|
+
|
33
|
+
# FIXME: rake test fails with LoadError
|
34
|
+
# C:/hostedtoolcache/windows/Ruby/2.7.3/x64/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:83:in `require': 126: The specified module could not be found. - D:/a/ruby-duckdb/ruby-duckdb/lib/duckdb/duckdb_native.so (LoadError)`
|
35
|
+
# - name: rake test
|
36
|
+
# run: |
|
37
|
+
# rake test
|
data/.travis.yml
CHANGED
@@ -2,13 +2,13 @@ language: ruby
|
|
2
2
|
cache:
|
3
3
|
bundler: true
|
4
4
|
directories:
|
5
|
-
- ${HOME}/duckdb-v0.2.
|
5
|
+
- ${HOME}/duckdb-v0.2.7
|
6
6
|
before_install:
|
7
7
|
- yes | gem update --system
|
8
|
-
- if [[ ! -d ${HOME}/duckdb-v0.2.
|
8
|
+
- if [[ ! -d ${HOME}/duckdb-v0.2.7/build ]]; then cd ${HOME} && git clone -b v0.2.7 https://github.com/cwida/duckdb.git duckdb-v0.2.7 && cd duckdb-v0.2.7 && make && cd ${TRAVIS_BUILD_DIR}; fi
|
9
9
|
|
10
10
|
env:
|
11
|
-
- DUCKDB_VERSION=0.2.
|
11
|
+
- DUCKDB_VERSION=0.2.7
|
12
12
|
rvm:
|
13
13
|
- 2.5.8
|
14
14
|
- 2.6.7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# ChangeLog
|
2
2
|
|
3
|
+
# 0.2.7.0
|
4
|
+
|
5
|
+
- call duckdb_free after calling duckdb_value_blob, duckdb_value_varchar.
|
6
|
+
- bump DuckDB to v0.2.7 in CI
|
7
|
+
- rake build on Windows in github actions.
|
8
|
+
- There is a issue (LoadError) when running rake test on Windows (in GitHub actions).
|
9
|
+
|
3
10
|
# 0.2.6.1
|
4
11
|
|
5
12
|
- add DuckDB::PreparedStatement#bind_int8
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -103,8 +103,6 @@ def insert
|
|
103
103
|
10000.times do
|
104
104
|
con.query("INSERT into users VALUES(1, 'Alice')")
|
105
105
|
end
|
106
|
-
# r = con.query('SELECT count(*) from users')
|
107
|
-
# p r.each.first
|
108
106
|
end
|
109
107
|
end
|
110
108
|
end
|
@@ -135,8 +133,6 @@ def append
|
|
135
133
|
appender.end_row
|
136
134
|
end
|
137
135
|
appender.flush
|
138
|
-
# r = con.query('SELECT count(*) from users')
|
139
|
-
# p r.each.first
|
140
136
|
end
|
141
137
|
end
|
142
138
|
end
|
data/ext/duckdb/extconf.rb
CHANGED
data/ext/duckdb/result.c
CHANGED
@@ -55,8 +55,19 @@ static VALUE to_ruby_obj_double(duckdb_result *result, idx_t col_idx, idx_t row_
|
|
55
55
|
#ifdef HAVE_DUCKDB_VALUE_BLOB
|
56
56
|
static VALUE to_ruby_obj_string_from_blob(duckdb_result *result, idx_t col_idx, idx_t row_idx)
|
57
57
|
{
|
58
|
+
VALUE str;
|
58
59
|
duckdb_blob bval = duckdb_value_blob(result, col_idx, row_idx);
|
59
|
-
|
60
|
+
str = rb_str_new(bval.data, bval.size);
|
61
|
+
|
62
|
+
if (bval.data) {
|
63
|
+
#ifdef HAVE_DUCKDB_FREE
|
64
|
+
duckdb_free(bval.data);
|
65
|
+
#else
|
66
|
+
free(bval.data);
|
67
|
+
#endif
|
68
|
+
}
|
69
|
+
|
70
|
+
return str;
|
60
71
|
}
|
61
72
|
#endif /* HAVE_DUCKDB_VALUE_BLOB */
|
62
73
|
|
@@ -86,10 +97,16 @@ static VALUE to_ruby_obj(duckdb_result *result, idx_t col_idx, idx_t row_idx)
|
|
86
97
|
#endif /* HAVE_DUCKDB_VALUE_BLOB */
|
87
98
|
default:
|
88
99
|
p = duckdb_value_varchar(result, col_idx, row_idx);
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
100
|
+
if (p) {
|
101
|
+
obj = rb_str_new2(p);
|
102
|
+
#ifdef HAVE_DUCKDB_FREE
|
103
|
+
duckdb_free(p);
|
104
|
+
#else
|
105
|
+
free(p);
|
106
|
+
#endif /* HAVE_DUCKDB_FREE */
|
107
|
+
if (result->columns[col_idx].type == DUCKDB_TYPE_HUGEINT) {
|
108
|
+
obj = rb_funcall(obj, rb_intern("to_i"), 0);
|
109
|
+
}
|
93
110
|
}
|
94
111
|
}
|
95
112
|
return obj;
|
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.2.
|
4
|
+
version: 0.2.7.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: 2021-06-
|
11
|
+
date: 2021-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -77,6 +77,7 @@ extra_rdoc_files: []
|
|
77
77
|
files:
|
78
78
|
- ".github/workflows/test_on_macos.yml"
|
79
79
|
- ".github/workflows/test_on_ubuntu.yml"
|
80
|
+
- ".github/workflows/test_on_windows.yml"
|
80
81
|
- ".gitignore"
|
81
82
|
- ".travis.yml"
|
82
83
|
- CHANGELOG.md
|