sqlite3 2.7.4 → 2.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d468349441f35814be6b404fda4ddc8763d0099fc1e30caa08586a390768be8
4
- data.tar.gz: c9194d6bbf26a645122dd88d9834711bdd0d277e9f01cd852e74374bb21e768e
3
+ metadata.gz: 700911c0444360801adadb3346db78846d6e517a08041f1d9796754406c3ae06
4
+ data.tar.gz: 5f00a2ebcc84ad8ebf634ef801eae95fb30306ffb2ead031ea4c45cbe0ff89eb
5
5
  SHA512:
6
- metadata.gz: f708c9cf3efc355f88c2c9760396d7b6e8845855c77d582d65a8e37b79d09d1086e24928072a5663f480378296b891259158fbe9d06ce53c3a95e0daf26eeb99
7
- data.tar.gz: baa858442188f4f65c0469747c9f96c4c31bc7058194ad4a670bccecb95a09d5396a5413dc22c0e238fbbd389550a44c13e80b449979c62abad108e62303a023
6
+ metadata.gz: 8a21c84ae7f12c591826043d86045a9d622cbcaca5f3ff9b95f0b2c7c991c18a673602db20d018e674558e37588cead865083272f253f21f2b8c0dfb1080ceb8
7
+ data.tar.gz: bbbe81b7dd7eb70f442aab8695d46ee213e6cf92464d7a52711a537112e2bba3b6b1e5dac51c4b6d420fbd400e7dc7f661b7b4521b5f377cbb9160d1e5a396a9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,46 @@
1
1
  # sqlite3-ruby Changelog
2
2
 
3
+ ## 2.9.3 / 2026-04-15
4
+
5
+ - Vendored sqlite is updated to [v3.53.0](https://www.sqlite.org/releaselog/3_53_0.html) (from v3.51.3). #696 @flavorjones
6
+
7
+
8
+ ## 2.9.2 / 2026-03-15
9
+
10
+ - Vendored sqlite is updated to [v3.51.3](https://www.sqlite.org/releaselog/3_51_3.html) (from v3.51.2). #688 @flavorjones
11
+
12
+
13
+ ## 2.9.1 / 2026-02-28
14
+
15
+ - Vendored sqlite is updated to [v3.51.2](https://www.sqlite.org/releaselog/3_51_2.html) (from v3.51.1). #683 @flavorjones
16
+
17
+ ## 2.9.0 / 2025-12-27
18
+
19
+ ### Ruby
20
+
21
+ - Introduce native gem packages for Ruby 4.0. @flavorjones
22
+ - Drop support for Ruby 3.1. @flavorjones
23
+
24
+ ### Added
25
+
26
+ - Introduce `Statement#named_params` to introspect on a parameterized SQL statement. #627 #642 @captn3m0
27
+
28
+ ### Improved
29
+
30
+ - Small improvements to docstrings and comments. @flavorjones @houyuanjie
31
+
32
+
33
+ ## 2.8.1 / 2025-11-29
34
+
35
+ - Vendored sqlite is updated to [v3.51.1](https://www.sqlite.org/releaselog/3_51_1.html) (from v3.51.0). #659 @flavorjones
36
+ - Precompiled native gems are built with rake-compiler-dock v1.10.0 (previously v1.9.1).
37
+
38
+
39
+ ## 2.8.0 / 2025-11-05
40
+
41
+ - Vendored sqlite is updated to [v3.51.0](https://www.sqlite.org/releaselog/3_51_0.html) (from v3.50.4). #652 @flavorjones
42
+
43
+
3
44
  ## 2.7.4 / 2025-09-19
4
45
 
5
46
  - Vendored sqlite is updated to [v3.50.4](https://www.sqlite.org/releaselog/3_50_4.html) (from v3.50.3). #644 @flavorjones
data/CONTRIBUTING.md CHANGED
@@ -47,14 +47,19 @@ Update `/dependencies.yml` to reflect:
47
47
 
48
48
  A quick checklist to cutting a release of the sqlite3 gem:
49
49
 
50
- - [ ] make sure CI is green!
51
- - bump the version
52
- - [ ] update `CHANGELOG.md` and `lib/sqlite3/version.rb`
53
- - [ ] create a git tag using a format that matches the pattern `v\d+\.\d+\.\d+`, e.g. `v1.3.13`
54
- - build the native gems
55
- - [ ] run `bin/build-gems` and make sure it completes and all the tests pass
56
- - push
57
- - [ ] `git push && git push --tags`
58
- - [ ] `for g in gems/*.gem ; do gem push $g ; done`
59
- - announce
60
- - [ ] create a release at https://github.com/sparklemotion/sqlite3-ruby/releases and include sha2 checksums
50
+ Prep
51
+ - [ ] Make sure CI is green!
52
+ - [ ] Update `CHANGELOG.md` and `lib/sqlite3/version.rb`
53
+ - [ ] Create a git tag using a format that matches the pattern `v\d+\.\d+\.\d+`, e.g. `v1.3.13`
54
+ - [ ] `git push && git push --tags`
55
+
56
+ Automated build and release
57
+ - [ ] Run workflow https://github.com/sparklemotion/sqlite3-ruby/actions/workflows/release.yml
58
+ - [ ] Copy checksums from the push job
59
+
60
+ Manual build and release
61
+ - [ ] Run `bin/build-gems` and make sure it completes and all the tests pass
62
+ - [ ] `for g in gems/*.gem ; do gem push $g ; done`
63
+
64
+ Post-release
65
+ - [ ] Create a release at https://github.com/sparklemotion/sqlite3-ruby/releases and include sha2 checksums
data/FAQ.md CHANGED
@@ -122,15 +122,17 @@ Placeholders in an SQL statement take any of the following formats:
122
122
  * `?`
123
123
  * `?_nnn_`
124
124
  * `:_word_`
125
+ * `$_word_`
126
+ * `@_word_`
125
127
 
126
128
 
127
- Where _n_ is an integer, and _word_ is an alpha-numeric identifier (or
128
- number). When the placeholder is associated with a number, that number
129
- identifies the index of the bind variable to replace it with. When it
130
- is an identifier, it identifies the name of the corresponding bind
131
- variable. (In the instance of the first format--a single question
132
- mark--the placeholder is assigned a number one greater than the last
133
- index used, or 1 if it is the first.)
129
+ Where _n_ is an integer, and _word_ is an alpha-numeric identifier(or number).
130
+ When the placeholder is associated with a number (only in case of `?_nnn_`),
131
+ that number identifies the index of the bind variable to replace it with.
132
+ When it is an identifier, it identifies the name of the corresponding bind
133
+ variable. (In the instance of the first format--a single question mark--the
134
+ placeholder is assigned a number one greater than the last index used, or 1
135
+ if it is the first.)
134
136
 
135
137
 
136
138
  For example, here is a query using these placeholder formats:
data/INSTALLATION.md CHANGED
@@ -7,7 +7,7 @@ This document will help you install the `sqlite3` ruby gem. It also contains ins
7
7
 
8
8
  ### Native Gems (recommended)
9
9
 
10
- In v2.0.0 and later, native (precompiled) gems are available for recent Ruby versions on these platforms:
10
+ In v2.5.0 and later, native (precompiled) gems are available for recent Ruby versions on these platforms:
11
11
 
12
12
  - `aarch64-linux-gnu` (requires: glibc >= 2.29)
13
13
  - `aarch64-linux-musl`
@@ -15,30 +15,30 @@ In v2.0.0 and later, native (precompiled) gems are available for recent Ruby ver
15
15
  - `arm-linux-musl`
16
16
  - `arm64-darwin`
17
17
  - `x64-mingw-ucrt`
18
- - `x86-linux-gnu` (requires: glibc >= 2.17)
18
+ - `x86-linux-gnu` (requires: glibc >= 2.29)
19
19
  - `x86-linux-musl`
20
20
  - `x86_64-darwin`
21
- - `x86_64-linux-gnu` (requires: glibc >= 2.17)
21
+ - `x86_64-linux-gnu` (requires: glibc >= 2.29)
22
22
  - `x86_64-linux-musl`
23
23
 
24
24
  ⚠ Musl linux users should update to Bundler >= 2.5.6 to avoid https://github.com/rubygems/rubygems/issues/7432
25
25
 
26
26
  If you are using one of these Ruby versions on one of these platforms, the native gem is the recommended way to install sqlite3-ruby.
27
27
 
28
- For example, on a linux system running Ruby 3.1:
28
+ For example, on a linux system running Ruby 3.4:
29
29
 
30
30
  ``` text
31
31
  $ ruby -v
32
- ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-linux]
32
+ ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [x86_64-linux]
33
33
 
34
34
  $ time gem install sqlite3
35
- Fetching sqlite3-1.5.0-x86_64-linux.gem
36
- Successfully installed sqlite3-1.5.0-x86_64-linux
35
+ Fetching sqlite3-2.8.1-x86_64-linux-gnu.gem
36
+ Successfully installed sqlite3-2.8.1-x86_64-linux-gnu
37
37
  1 gem installed
38
38
 
39
- real 0m4.274s
40
- user 0m0.734s
41
- sys 0m0.165s
39
+ real 0m1.273s
40
+ user 0m0.496s
41
+ sys 0m0.078s
42
42
  ```
43
43
 
44
44
  #### Avoiding the precompiled native gem
data/dependencies.yml CHANGED
@@ -1,13 +1,13 @@
1
1
  sqlite3:
2
2
  # checksum verified by first checking the published sha3(256) checksum against https://sqlite.org/download.html:
3
- # 330bb88febc08814d49406391891eddac59e5f812e87b83c27ab172687554375
3
+ # 60c4b08c6729761e488d185e0d52411da10b14c72b53ada6936dc5eea225cefe
4
4
  #
5
- # $ sha3sum -a 256 ports/archives/sqlite-autoconf-3500400.tar.gz
6
- # 330bb88febc08814d49406391891eddac59e5f812e87b83c27ab172687554375 ports/archives/sqlite-autoconf-3500400.tar.gz
5
+ # $ sha3sum -a 256 ports/archives/sqlite-autoconf-3530000.tar.gz
6
+ # 60c4b08c6729761e488d185e0d52411da10b14c72b53ada6936dc5eea225cefe ports/archives/sqlite-autoconf-3530000.tar.gz
7
7
  #
8
- # $ sha256sum ports/archives/sqlite-autoconf-3500400.tar.gz
9
- # a3db587a1b92ee5ddac2f66b3edb41b26f9c867275782d46c3a088977d6a5b18 ports/archives/sqlite-autoconf-3500400.tar.gz
10
- version: "3.50.4"
8
+ # $ sha256sum ports/archives/sqlite-autoconf-3530000.tar.gz
9
+ # 851e9b38192fe2ceaa65e0baa665e7fa06230c3d9bd1a6a9662d02380d73365a ports/archives/sqlite-autoconf-3530000.tar.gz
10
+ version: "3.53.0"
11
11
  files:
12
- - url: "https://sqlite.org/2025/sqlite-autoconf-3500400.tar.gz"
13
- sha256: "a3db587a1b92ee5ddac2f66b3edb41b26f9c867275782d46c3a088977d6a5b18"
12
+ - url: "https://sqlite.org/2026/sqlite-autoconf-3530000.tar.gz"
13
+ sha256: "851e9b38192fe2ceaa65e0baa665e7fa06230c3d9bd1a6a9662d02380d73365a"
@@ -460,6 +460,40 @@ bind_parameter_count(VALUE self)
460
460
  return INT2NUM(sqlite3_bind_parameter_count(ctx->st));
461
461
  }
462
462
 
463
+ /** call-seq: stmt.named_params
464
+ *
465
+ * Return the list of named parameters in the statement.
466
+ * This returns a frozen array of strings (without the leading prefix character).
467
+ * The values of this list can be used to bind parameters
468
+ * to the statement using bind_param. Positional (?NNN) and anonymous (?)
469
+ * parameters are excluded.
470
+ *
471
+ */
472
+ static VALUE
473
+ named_params(VALUE self)
474
+ {
475
+ sqlite3StmtRubyPtr ctx;
476
+ TypedData_Get_Struct(self, sqlite3StmtRuby, &statement_type, ctx);
477
+
478
+ REQUIRE_LIVE_DB(ctx);
479
+ REQUIRE_OPEN_STMT(ctx);
480
+
481
+ int param_count = sqlite3_bind_parameter_count(ctx->st);
482
+ VALUE params = rb_ary_new2(param_count);
483
+
484
+ // The first host parameter has an index of 1, not 0.
485
+ for (int i = 1; i <= param_count; i++) {
486
+ const char *name = sqlite3_bind_parameter_name(ctx->st, i);
487
+ // We ignore positional and anonymous parameters, and also null values, since there can be
488
+ // gaps in the list.
489
+ if (name && *name != '?') {
490
+ VALUE param = interned_utf8_cstr(name + 1);
491
+ rb_ary_push(params, param);
492
+ }
493
+ }
494
+ return rb_obj_freeze(params);
495
+ }
496
+
463
497
  enum stmt_stat_sym {
464
498
  stmt_stat_sym_fullscan_steps,
465
499
  stmt_stat_sym_sorts,
@@ -594,7 +628,7 @@ stat_for(VALUE self, VALUE key)
594
628
  }
595
629
 
596
630
  #ifdef SQLITE_STMTSTATUS_MEMUSED
597
- /* call-seq: stmt.memory_used
631
+ /* call-seq: stmt.memused
598
632
  *
599
633
  * Return the approximate number of bytes of heap memory used to store the prepared statement
600
634
  */
@@ -689,6 +723,7 @@ init_sqlite3_statement(void)
689
723
  rb_define_method(cSqlite3Statement, "column_name", column_name, 1);
690
724
  rb_define_method(cSqlite3Statement, "column_decltype", column_decltype, 1);
691
725
  rb_define_method(cSqlite3Statement, "bind_parameter_count", bind_parameter_count, 0);
726
+ rb_define_method(cSqlite3Statement, "named_params", named_params, 0);
692
727
  rb_define_method(cSqlite3Statement, "sql", get_sql, 0);
693
728
  rb_define_method(cSqlite3Statement, "expanded_sql", get_expanded_sql, 0);
694
729
  #ifdef HAVE_SQLITE3_COLUMN_DATABASE_NAME
@@ -1,4 +1,4 @@
1
1
  module SQLite3
2
2
  # (String) the version of the sqlite3 gem, e.g. "2.1.1"
3
- VERSION = "2.7.4"
3
+ VERSION = "2.9.3"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite3
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.4
4
+ version: 2.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -75,7 +75,7 @@ files:
75
75
  - lib/sqlite3/value.rb
76
76
  - lib/sqlite3/version.rb
77
77
  - lib/sqlite3/version_info.rb
78
- - ports/archives/sqlite-autoconf-3500400.tar.gz
78
+ - ports/archives/sqlite-autoconf-3530000.tar.gz
79
79
  homepage: https://github.com/sparklemotion/sqlite3-ruby
80
80
  licenses:
81
81
  - BSD-3-Clause
@@ -96,14 +96,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: '3.1'
99
+ version: '3.2'
100
100
  required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  requirements:
102
102
  - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: '0'
105
105
  requirements: []
106
- rubygems_version: 3.6.9
106
+ rubygems_version: 4.0.6
107
107
  specification_version: 4
108
108
  summary: Ruby library to interface with the SQLite3 database engine (http://www.sqlite.org).
109
109
  test_files: []