duckdb 1.1.0.0 → 1.1.0.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: 17d405dc19edeb4bbdea3da427974d5a3904fb2f10536fae4494fa284bebd8ff
4
- data.tar.gz: 8f26f51c5d14d8854009619916008a8742ebf09f351e5e8f025ccc2fad9ccf13
3
+ metadata.gz: 874174344b2be8ad2eba6fa1e89d2c96827a7e53e0982bacaa7a804b1ee8cf0b
4
+ data.tar.gz: 9d57293bc3dc59cc10ad7a23ae8e0b8ed4944524c83ecd3e5e9503c6f460d73f
5
5
  SHA512:
6
- metadata.gz: 6a15f0763765f35dc5c86cde1425acc6c1e001bec99fd3901aeeeaf74ca94d3af9ad9905be43c8b2a7c0eb3b87a68d20945f25063c8a2e77ba527e54c3c8d49e
7
- data.tar.gz: 0061c636c7d80629677b27cab21b173690b8e7aed3f8f8df86783632e92bca9a7349ae80e2e6cb32b04ea356c61c31a9abfdd15da1b05b138f3de186411c5969
6
+ metadata.gz: b8739a162ec00fb0bb98e13d4f9adecb8f3230e2b4fa81067a128ce4f9db4456b76fe825652ba09b46a5c05fb1f7637a762f369f28f9d7d9423649f7e646b7f0
7
+ data.tar.gz: 3b564b2aa68cbfcc5eec96d9cc4dd038749d172b28b2329ba20af14610bc1db34a270d3034688dfdf852b26edd0a711d803886e3d731619848d5cd5e6ca331be
@@ -15,7 +15,7 @@ jobs:
15
15
  runs-on: macos-latest
16
16
  strategy:
17
17
  matrix:
18
- ruby: ['3.1.6', '3.2.4', '3.3.5', '3.4.0-preview1', 'head']
18
+ ruby: ['3.1.6', '3.2.5', '3.3.5', '3.4.0-preview1', 'head']
19
19
  duckdb: ['1.1.0', '1.0.0', '0.10.3']
20
20
 
21
21
  steps:
@@ -15,7 +15,7 @@ jobs:
15
15
  runs-on: ubuntu-latest
16
16
  strategy:
17
17
  matrix:
18
- ruby: ['3.1.6', '3.2.4', '3.3.5', '3.4.0-preview1', 'head']
18
+ ruby: ['3.1.6', '3.2.5', '3.3.5', '3.4.0-preview1', 'head']
19
19
  duckdb: ['1.1.0', '1.0.0', '0.10.3']
20
20
 
21
21
  steps:
@@ -15,7 +15,7 @@ jobs:
15
15
  runs-on: windows-latest
16
16
  strategy:
17
17
  matrix:
18
- ruby: ['3.1.5', '3.2.4', '3.3.4', 'ucrt', 'mingw', 'mswin', 'head']
18
+ ruby: ['3.1.6', '3.2.5', '3.3.5', 'ucrt', 'mingw', 'mswin', 'head']
19
19
  duckdb: ['1.1.0', '1.0.0', '0.10.3']
20
20
 
21
21
  steps:
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
+ # Unreleased
5
+
6
+ # 1.1.0.1 - 2024-09-21
7
+ - add `DuckDB::Connection#prepare`. `DuckDB::Connection#prepare` is an alias of `DuckDB::Connection#prepared_statement`.
4
8
 
5
9
  # 1.1.0.0 - 2024-09-15
6
10
  - drop ruby 3.0.x.
@@ -31,7 +35,7 @@ All notable changes to this project will be documented in this file.
31
35
  ## Breaking changes
32
36
  - drop duckdb v0.9.x.
33
37
  - skip to check duckdb_parameter_name is available.
34
- - The following methods are deprecated.
38
+ - The following methods are obsoleted.
35
39
  - `DuckDB::Result#_null?`
36
40
  - `DuckDB::Result#_to_boolean`
37
41
  - `DuckDB::Result#_to_smallint`
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- duckdb (1.1.0.0)
4
+ duckdb (1.1.0.1)
5
5
  bigdecimal (>= 3.1.4)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -113,7 +113,19 @@ con.query('SELECT * FROM users WHERE name = ? AND email = ?', 'Alice', 'alice@ex
113
113
  # or
114
114
  con.query('SELECT * FROM users WHERE name = $name AND email = $email', name: 'Alice', email: 'alice@example.com')
115
115
  ```
116
+ ### Using prepared statement
116
117
 
118
+ You can use prepared statement.
119
+
120
+ ```ruby
121
+ stmt = con.prepare('SELECT * FROM users WHERE name = $name AND email = $email')
122
+ # or
123
+ # stmt = con.prepared_statement('SELECT * FROM users WHERE name = $name AND email = $email')
124
+ # or
125
+ # stmt = DuckDB::PreparedStatement.new(con, 'SELECT * FROM users WHERE name = $name AND email = $email')
126
+ stmt.bind(name: 'Alice', email: 'alice@example.com')
127
+ result = stmt.execute
128
+ ```
117
129
  ### Using async query
118
130
 
119
131
  You can use async query.
@@ -97,6 +97,14 @@ module DuckDB
97
97
  # returns PreparedStatement object.
98
98
  # The first argument is SQL string.
99
99
  #
100
+ # require 'duckdb'
101
+ # db = DuckDB::Database.open('duckdb_file')
102
+ # con = db.connect
103
+ #
104
+ # sql = 'SELECT * FROM users WHERE name = $name AND email = $email'
105
+ # stmt = con.prepared_statement(sql)
106
+ # stmt.bind_args(name: 'Dave', email: 'dave@example.com')
107
+ # result = stmt.execute
100
108
  def prepared_statement(str)
101
109
  PreparedStatement.new(self, str)
102
110
  end
@@ -126,5 +134,6 @@ module DuckDB
126
134
  alias async_execute async_query
127
135
  alias open connect
128
136
  alias close disconnect
137
+ alias prepare prepared_statement
129
138
  end
130
139
  end
@@ -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 = '1.1.0.0'
6
+ VERSION = '1.1.0.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: 1.1.0.0
4
+ version: 1.1.0.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-09-15 00:00:00.000000000 Z
11
+ date: 2024-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bigdecimal