duckdb 0.9.0.1 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aac4fbdeca8ed41cef872ace9dd3c8784ce43ee224a733f469fcd0907e852cd5
4
- data.tar.gz: 56c8a5831830264fd4dfac41ba7a60bb9e6493a40536a5502c10dc0fc41b16d7
3
+ metadata.gz: 2948812978266d6ca2040d2071479f0484fe39719be860282e238b1e786a53e7
4
+ data.tar.gz: 3a3d10a5dd8e318b7a6274e6e32f0fc4850eeafada95673b42ed6c6121a36af5
5
5
  SHA512:
6
- metadata.gz: b94ffce97a54769bae379a3b13765b2132df1efe80fdb8f4855f77248855e95e9370651dbbe165a64c6ee45aff5bef20b3800a680f3da5287528974a243af338
7
- data.tar.gz: 96accf18b7f4df7721efaec8e215e92dcbe97d22a99d89ffb64658f4696eb462b8ceaa27a3e558cba8ef5a7ce257fc4e3b35f83178fadf8047e19280563e7ae6
6
+ metadata.gz: f4bf27bf6c3e378650584e9226bd0c2e16a76a2d5e68c96451f5abafb4dfe6fbb4df705ceb754ac8df30ed36bc6fe67299f61861fa882ef11acac79dea1e80cf
7
+ data.tar.gz: 71f42787f8368ab322c5d8c9a9a74227117dbf0454601d9ac3ec407188497c34e437fd5de14bec2038d6f3df3233098b580a8e116f8590dedd8004b7ba934f5a
@@ -16,7 +16,7 @@ jobs:
16
16
  strategy:
17
17
  matrix:
18
18
  ruby: ['2.7.8', '3.0.6', '3.1.4', '3.2.2', '3.3.0-preview2', 'head']
19
- duckdb: ['0.9.0', '0.8.1']
19
+ duckdb: ['0.9.1', '0.8.1']
20
20
 
21
21
  steps:
22
22
  - uses: actions/checkout@v3
@@ -16,7 +16,7 @@ jobs:
16
16
  strategy:
17
17
  matrix:
18
18
  ruby: ['2.7.8', '3.0.6', '3.1.4', '3.2.2', '3.3.0-preview2', 'head']
19
- duckdb: ['0.9.0', '0.8.1']
19
+ duckdb: ['0.9.1', '0.8.1']
20
20
 
21
21
  steps:
22
22
  - uses: actions/checkout@v3
@@ -16,7 +16,7 @@ jobs:
16
16
  strategy:
17
17
  matrix:
18
18
  ruby: ['2.7.8', '3.0.6', '3.1.4', '3.2.2', 'ucrt', 'mingw', 'mswin', 'head']
19
- duckdb: ['0.9.0', '0.8.1']
19
+ duckdb: ['0.9.1', '0.8.1']
20
20
 
21
21
  steps:
22
22
  - uses: actions/checkout@v3
data/CHANGELOG.md CHANGED
@@ -1,7 +1,10 @@
1
1
  # ChangeLog
2
2
 
3
- # 0.9.0.1
3
+ # 0.9.1
4
+ - add `DuckDB::PreparedStatement#parameter_name`.
5
+ - bump duckdb to 0.9.1.
4
6
 
7
+ # 0.9.0.1
5
8
  - add `DuckDB::PreparedStatement#bind_parameter_index`.
6
9
  - DuckDB::Connection#query accepts SQL with named bind parameters.
7
10
 
data/Dockerfile CHANGED
@@ -1,7 +1,7 @@
1
1
  ARG RUBY_VERSION=3.2.2
2
2
  FROM ruby:${RUBY_VERSION}
3
3
 
4
- ARG DUCKDB_VERSION=0.9.0
4
+ ARG DUCKDB_VERSION=0.9.1
5
5
 
6
6
  RUN apt update -qq && \
7
7
  apt install -y build-essential curl git wget
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- duckdb (0.9.0.1)
4
+ duckdb (0.9.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -31,4 +31,6 @@ have_func('duckdb_string_is_inlined', 'duckdb.h')
31
31
  # check duckdb >= 0.9.0
32
32
  have_func('duckdb_bind_parameter_index', 'duckdb.h')
33
33
 
34
+ have_func('duckdb_parameter_name', 'duckdb.h')
35
+
34
36
  create_makefile('duckdb/duckdb_native')
@@ -12,6 +12,9 @@ static idx_t check_index(VALUE vidx);
12
12
 
13
13
  #ifdef HAVE_DUCKDB_H_GE_V090
14
14
  static VALUE duckdb_prepared_statement_bind_parameter_index(VALUE self, VALUE name);
15
+ #ifdef HAVE_DUCKDB_PARAMETER_NAME
16
+ static VALUE duckdb_prepared_statement_parameter_name(VALUE self, VALUE vidx);
17
+ #endif
15
18
  #endif
16
19
 
17
20
  static VALUE duckdb_prepared_statement_bind_bool(VALUE self, VALUE vidx, VALUE val);
@@ -110,7 +113,26 @@ static VALUE duckdb_prepared_statement_bind_parameter_index(VALUE self, VALUE na
110
113
  }
111
114
  return ULL2NUM(idx);
112
115
  }
113
- #endif
116
+
117
+ #ifdef HAVE_DUCKDB_PARAMETER_NAME
118
+ static VALUE duckdb_prepared_statement_parameter_name(VALUE self, VALUE vidx) {
119
+ rubyDuckDBPreparedStatement *ctx;
120
+ VALUE vname;
121
+ const char *name;
122
+ idx_t idx = check_index(vidx);
123
+
124
+ TypedData_Get_Struct(self, rubyDuckDBPreparedStatement, &prepared_statement_data_type, ctx);
125
+
126
+ name = duckdb_parameter_name(ctx->prepared_statement, idx);
127
+ if (name == NULL) {
128
+ rb_raise(eDuckDBError, "fail to get name of %llu parameter", (unsigned long long)idx);
129
+ }
130
+ vname = rb_str_new2(name);
131
+ duckdb_free((void *)name);
132
+ return vname;
133
+ }
134
+ #endif /* HAVE_DUCKDB_PARAMETER_NAME */
135
+ #endif /* HAVE_DUCKDB_H_GE_V090 */
114
136
 
115
137
  static VALUE duckdb_prepared_statement_bind_bool(VALUE self, VALUE vidx, VALUE val) {
116
138
  rubyDuckDBPreparedStatement *ctx;
@@ -330,6 +352,9 @@ void init_duckdb_prepared_statement(void) {
330
352
 
331
353
  #ifdef HAVE_DUCKDB_H_GE_V090
332
354
  rb_define_method(cDuckDBPreparedStatement, "bind_parameter_index", duckdb_prepared_statement_bind_parameter_index, 1);
355
+ #ifdef HAVE_DUCKDB_PARAMETER_NAME
356
+ rb_define_method(cDuckDBPreparedStatement, "parameter_name", duckdb_prepared_statement_parameter_name, 1);
357
+ #endif
333
358
  #endif
334
359
 
335
360
  rb_define_method(cDuckDBPreparedStatement, "bind_bool", duckdb_prepared_statement_bind_bool, 2);
@@ -3,5 +3,5 @@
3
3
  module DuckDB
4
4
  # The version string of ruby-duckdb.
5
5
  # Currently, ruby-duckdb is NOT semantic versioning.
6
- VERSION = '0.9.0.1'
6
+ VERSION = '0.9.1'
7
7
  end
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.9.0.1
4
+ version: 0.9.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: 2023-10-08 00:00:00.000000000 Z
11
+ date: 2023-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler