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 +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 +4 -1
- data/Dockerfile +1 -1
- data/Gemfile.lock +1 -1
- data/ext/duckdb/extconf.rb +2 -0
- data/ext/duckdb/prepared_statement.c +26 -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: 2948812978266d6ca2040d2071479f0484fe39719be860282e238b1e786a53e7
|
4
|
+
data.tar.gz: 3a3d10a5dd8e318b7a6274e6e32f0fc4850eeafada95673b42ed6c6121a36af5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4bf27bf6c3e378650584e9226bd0c2e16a76a2d5e68c96451f5abafb4dfe6fbb4df705ceb754ac8df30ed36bc6fe67299f61861fa882ef11acac79dea1e80cf
|
7
|
+
data.tar.gz: 71f42787f8368ab322c5d8c9a9a74227117dbf0454601d9ac3ec407188497c34e437fd5de14bec2038d6f3df3233098b580a8e116f8590dedd8004b7ba934f5a
|
data/CHANGELOG.md
CHANGED
data/Dockerfile
CHANGED
data/Gemfile.lock
CHANGED
data/ext/duckdb/extconf.rb
CHANGED
@@ -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
|
-
|
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);
|
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.9.
|
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-
|
11
|
+
date: 2023-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|