sqlite3 1.6.5-x64-mingw32 → 1.6.6-x64-mingw32

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: a9cd397040fecaa7542304e94e629b2955e43cedb7ddc61b1cbc1a6d3d616834
4
- data.tar.gz: 25f8b8998a2960c1d2d96d1861fcaa21a2865b8cc1c0369658526f048afe4a4c
3
+ metadata.gz: 2f168b64bfc2ba7c07e9cf49b26eec86369844110c54067eb3036d53fb0a758c
4
+ data.tar.gz: a8656c8f76f1c568c8e7e043876dc0846c0f6815ebdca712aa40a99bc71d6ab1
5
5
  SHA512:
6
- metadata.gz: 1d1b80f4068a6acf2c36f96253816105c3987a7c3ddfe4d86bd57ba8d3b30e7290611136bf134e524b1d9bf2845ef46be353681037c658938f0ac34a4aae3f78
7
- data.tar.gz: 707fc1da97e5f972315c8677bf05089bd1411237453312a1468e733a8cd82651861f45ecbdf746284cc3eed13a2813deafd73d148a9f5dc45a706a0bcfb95c36
6
+ metadata.gz: d1bcaa8065bfe6ec421320ea972911a0fcb06329aa1e06c41a0819dc2f61e325ec2eddf66662e652dadc8fddd386494116d1843e0f2268271fa8f8f815d73a9e
7
+ data.tar.gz: 4f73f3eb5525ce5f4c34e821907a647b8a5475b34249d7ea7a84d9f872a1dffabdd210f7049edde1d466e8d57327471a8b7472d6ed95d36c69308b2e802a129c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # sqlite3-ruby Changelog
2
2
 
3
+ ## 1.6.6 / 2023-09-12
4
+
5
+ ### Dependencies
6
+
7
+ Vendored sqlite is updated to [v3.43.1](https://sqlite.org/releaselog/3_43_1.html).
8
+
9
+ Upstream release notes:
10
+
11
+ > - Fix a regression in the way that the [sum()](https://sqlite.org/lang_aggfunc.html#sumunc), [avg()](https://sqlite.org/lang_aggfunc.html#avg), and [total()](https://sqlite.org/lang_aggfunc.html#sumunc) aggregate functions handle infinities.
12
+ > - Fix a bug in the [json_array_length()](https://sqlite.org/json1.html#jarraylen) function that occurs when the argument comes directly from [json_remove()](https://sqlite.org/json1.html#jrm).
13
+ > - Fix the omit-unused-subquery-columns optimization (introduced in in version 3.42.0) so that it works correctly if the subquery is a compound where one arm is DISTINCT and the other is not.
14
+ > - Other minor fixes.
15
+
16
+
3
17
  ## 1.6.5 / 2023-09-08
4
18
 
5
19
  ### Packaging
data/CONTRIBUTING.md CHANGED
@@ -27,7 +27,8 @@ A quick checklist:
27
27
 
28
28
  - [ ] make sure CI is green!
29
29
  - [ ] update `CHANGELOG.md` and `lib/sqlite3/version.rb` including `VersionProxy::{MINOR,TINY}`
30
- - [ ] create a git tag using a format that matches the pattern `v\d+\.\d+\.\d+`, e.g. `v1.3.13`
31
30
  - [ ] run `bin/build-gems` and make sure it completes and all the tests pass
31
+ - [ ] create a git tag using a format that matches the pattern `v\d+\.\d+\.\d+`, e.g. `v1.3.13`
32
+ - [ ] `git push && git push --tags`
32
33
  - [ ] `for g in gems/*.gem ; do gem push $g ; done`
33
34
  - [ ] create a release at https://github.com/sparklemotion/sqlite3-ruby/releases and include sha2 checksums
data/Gemfile CHANGED
@@ -2,10 +2,10 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem("minitest", "~> 5.15")
6
- gem("rake-compiler", "~> 1.2.0")
5
+ gem("minitest", "5.20.0")
6
+ gem("rake-compiler", "1.2.5")
7
7
  gem("rake-compiler-dock", "1.3.0")
8
- gem("rdoc", ">= 4.0", "< 7")
9
- gem("psych", "~> 4.0") # psych 5 doesn't build on some CI platforms yet
8
+ gem("rdoc", "6.5.0")
9
+ gem("psych", "5.1.0")
10
10
 
11
- gem("ruby_memcheck") if Gem::Platform.local.os == "linux"
11
+ gem("ruby_memcheck", "2.1.2") if Gem::Platform.local.os == "linux"
data/dependencies.yml CHANGED
@@ -2,13 +2,13 @@
2
2
  :sqlite3:
3
3
  # checksum verified by first checking the published sha3(256) checksum against https://sqlite.org/download.html:
4
4
  #
5
- # $ sha3sum -a 256 ports/archives/sqlite-autoconf-3430000.tar.gz
6
- # cc321c7b0a70f87aaefe5d0aa89cdd97b432c3d2d448fa623f20988007c49f34 ports/archives/sqlite-autoconf-3430000.tar.gz
5
+ # $ sha3sum -a 256 ports/archives/sqlite-autoconf-3430100.tar.gz
6
+ # 8c6242fb2abf6a556e849d259134aca9130520b2218f9a7fb1f50eb0528a385a ports/archives/sqlite-autoconf-3430100.tar.gz
7
7
  #
8
- # $ sha256sum ports/archives/sqlite-autoconf-3430000.tar.gz
9
- # 49008dbf3afc04d4edc8ecfc34e4ead196973034293c997adad2f63f01762ae1 ports/archives/sqlite-autoconf-3430000.tar.gz
8
+ # $ sha256sum ports/archives/sqlite-autoconf-3430100.tar.gz
9
+ # 46db2f10f306e163e4571b8974d44cd37078aae04295bbf08b253655df3265f4 ports/archives/sqlite-autoconf-3430100.tar.gz
10
10
  #
11
- :version: "3.43.0"
11
+ :version: "3.43.1"
12
12
  :files:
13
- - :url: "https://sqlite.org/2023/sqlite-autoconf-3430000.tar.gz"
14
- :sha256: "49008dbf3afc04d4edc8ecfc34e4ead196973034293c997adad2f63f01762ae1"
13
+ - :url: "https://sqlite.org/2023/sqlite-autoconf-3430100.tar.gz"
14
+ :sha256: "46db2f10f306e163e4571b8974d44cd37078aae04295bbf08b253655df3265f4"
@@ -127,7 +127,7 @@ static VALUE total_changes(VALUE self)
127
127
  Data_Get_Struct(self, sqlite3Ruby, ctx);
128
128
  REQUIRE_OPEN_DB(ctx);
129
129
 
130
- return INT2NUM((long)sqlite3_total_changes(ctx->db));
130
+ return INT2NUM(sqlite3_total_changes(ctx->db));
131
131
  }
132
132
 
133
133
  static void tracefunc(void * data, const char *sql)
@@ -168,7 +168,7 @@ static int rb_sqlite3_busy_handler(void * ctx, int count)
168
168
  {
169
169
  VALUE self = (VALUE)(ctx);
170
170
  VALUE handle = rb_iv_get(self, "@busy_handler");
171
- VALUE result = rb_funcall(handle, rb_intern("call"), 1, INT2NUM((long)count));
171
+ VALUE result = rb_funcall(handle, rb_intern("call"), 1, INT2NUM(count));
172
172
 
173
173
  if(Qfalse == result) return 0;
174
174
 
@@ -413,7 +413,7 @@ static VALUE errcode_(VALUE self)
413
413
  Data_Get_Struct(self, sqlite3Ruby, ctx);
414
414
  REQUIRE_OPEN_DB(ctx);
415
415
 
416
- return INT2NUM((long)sqlite3_errcode(ctx->db));
416
+ return INT2NUM(sqlite3_errcode(ctx->db));
417
417
  }
418
418
 
419
419
  /* call-seq: complete?(sql)
@@ -348,7 +348,7 @@ static VALUE column_count(VALUE self)
348
348
  Data_Get_Struct(self, sqlite3StmtRuby, ctx);
349
349
  REQUIRE_OPEN_STMT(ctx);
350
350
 
351
- return INT2NUM((long)sqlite3_column_count(ctx->st));
351
+ return INT2NUM(sqlite3_column_count(ctx->st));
352
352
  }
353
353
 
354
354
  /* call-seq: stmt.column_name(index)
@@ -397,7 +397,7 @@ static VALUE bind_parameter_count(VALUE self)
397
397
  Data_Get_Struct(self, sqlite3StmtRuby, ctx);
398
398
  REQUIRE_OPEN_STMT(ctx);
399
399
 
400
- return INT2NUM((long)sqlite3_bind_parameter_count(ctx->st));
400
+ return INT2NUM(sqlite3_bind_parameter_count(ctx->st));
401
401
  }
402
402
 
403
403
  #ifdef HAVE_SQLITE3_COLUMN_DATABASE_NAME
Binary file
Binary file
@@ -116,9 +116,7 @@ module SQLite3
116
116
 
117
117
  def type_translation= value # :nodoc:
118
118
  warn(<<-eowarn) if $VERBOSE
119
- #{caller[0]} is calling SQLite3::Database#type_translation=
120
- SQLite3::Database#type_translation= is deprecated and will be removed
121
- in version 2.0.0.
119
+ #{caller[0]} is calling `SQLite3::Database#type_translation=` which is deprecated and will be removed in version 2.0.0.
122
120
  eowarn
123
121
  @type_translator = make_type_translator value
124
122
  @type_translation = value
@@ -189,9 +187,7 @@ in version 2.0.0.
189
187
  end
190
188
 
191
189
  warn(<<-eowarn) if $VERBOSE
192
- #{caller[0]} is calling SQLite3::Database#execute with nil or multiple bind params
193
- without using an array. Please switch to passing bind parameters as an array.
194
- Support for bind parameters as *args will be removed in 2.0.0.
190
+ #{caller[0]} is calling `SQLite3::Database#execute` with nil or multiple bind params without using an array. Please switch to passing bind parameters as an array. Support for bind parameters as *args will be removed in 2.0.0.
195
191
  eowarn
196
192
  end
197
193
 
@@ -248,9 +244,7 @@ Support for bind parameters as *args will be removed in 2.0.0.
248
244
  unless [Array, Hash].include?(bind_vars.class)
249
245
  bind_vars = [bind_vars]
250
246
  warn(<<-eowarn) if $VERBOSE
251
- #{caller[0]} is calling SQLite3::Database#execute_batch with bind parameters
252
- that are not a list of a hash. Please switch to passing bind parameters as an
253
- array or hash. Support for this behavior will be removed in version 2.0.0.
247
+ #{caller[0]} is calling `SQLite3::Database#execute_batch` with bind parameters that are not a list of a hash. Please switch to passing bind parameters as an array or hash. Support for this behavior will be removed in version 2.0.0.
254
248
  eowarn
255
249
  end
256
250
 
@@ -263,9 +257,7 @@ array or hash. Support for this behavior will be removed in version 2.0.0.
263
257
  end
264
258
 
265
259
  warn(<<-eowarn) if $VERBOSE
266
- #{caller[0]} is calling SQLite3::Database#execute_batch with nil or multiple bind params
267
- without using an array. Please switch to passing bind parameters as an array.
268
- Support for this behavior will be removed in version 2.0.0.
260
+ #{caller[0]} is calling `SQLite3::Database#execute_batch` with nil or multiple bind params without using an array. Please switch to passing bind parameters as an array. Support for this behavior will be removed in version 2.0.0.
269
261
  eowarn
270
262
  end
271
263
 
@@ -332,9 +324,7 @@ Support for this behavior will be removed in version 2.0.0.
332
324
  end
333
325
 
334
326
  warn(<<-eowarn) if $VERBOSE
335
- #{caller[0]} is calling SQLite3::Database#query with nil or multiple bind params
336
- without using an array. Please switch to passing bind parameters as an array.
337
- Support for this will be removed in version 2.0.0.
327
+ #{caller[0]} is calling `SQLite3::Database#query` with nil or multiple bind params without using an array. Please switch to passing bind parameters as an array. Support for this will be removed in version 2.0.0.
338
328
  eowarn
339
329
  end
340
330
 
@@ -20,18 +20,14 @@ module SQLite3
20
20
 
21
21
  def types
22
22
  warn(<<-eowarn) if $VERBOSE
23
- #{caller[0]} is calling #{self.class}#types. This method will be removed in
24
- sqlite3 version 2.0.0, please call the `types` method on the SQLite3::ResultSet
25
- object that created this object
23
+ #{caller[0]} is calling `#{self.class}#types` which is deprecated and will be removed in sqlite3 version 2.0.0. Please call the `types` method on the SQLite3::ResultSet object that created this object.
26
24
  eowarn
27
25
  @types
28
26
  end
29
27
 
30
28
  def fields
31
29
  warn(<<-eowarn) if $VERBOSE
32
- #{caller[0]} is calling #{self.class}#fields. This method will be removed in
33
- sqlite3 version 2.0.0, please call the `columns` method on the SQLite3::ResultSet
34
- object that created this object
30
+ #{caller[0]} is calling `#{self.class}#fields` which is deprecated and will be removed in sqlite3 version 2.0.0. Please call the `columns` method on the SQLite3::ResultSet object that created this object.
35
31
  eowarn
36
32
  @fields
37
33
  end
@@ -45,18 +41,14 @@ object that created this object
45
41
 
46
42
  def types
47
43
  warn(<<-eowarn) if $VERBOSE
48
- #{caller[0]} is calling #{self.class}#types. This method will be removed in
49
- sqlite3 version 2.0.0, please call the `types` method on the SQLite3::ResultSet
50
- object that created this object
44
+ #{caller[0]} is calling `#{self.class}#types` which is deprecated and will be removed in sqlite3 version 2.0.0. Please call the `types` method on the SQLite3::ResultSet object that created this object.
51
45
  eowarn
52
46
  @types
53
47
  end
54
48
 
55
49
  def fields
56
50
  warn(<<-eowarn) if $VERBOSE
57
- #{caller[0]} is calling #{self.class}#fields. This method will be removed in
58
- sqlite3 version 2.0.0, please call the `columns` method on the SQLite3::ResultSet
59
- object that created this object
51
+ #{caller[0]} is calling `#{self.class}#fields` which is deprecated and will be removed in sqlite3 version 2.0.0. Please call the `columns` method on the SQLite3::ResultSet object that created this object.
60
52
  eowarn
61
53
  @fields
62
54
  end
@@ -36,8 +36,7 @@ module SQLite3
36
36
  # The block should return the translated value.
37
37
  def add_translator( type, &block ) # :yields: type, value
38
38
  warn(<<-eowarn) if $VERBOSE
39
- #{caller[0]} is calling `add_translator`.
40
- Built in translators are deprecated and will be removed in version 2.0.0
39
+ #{caller[0]} is calling `SQLite3::Translator#add_translator`. Built-in translators are deprecated and will be removed in version 2.0.0.
41
40
  eowarn
42
41
  @translators[ type_name( type ) ] = block
43
42
  end
@@ -1,11 +1,11 @@
1
1
  module SQLite3
2
2
 
3
- VERSION = "1.6.5"
3
+ VERSION = "1.6.6"
4
4
 
5
5
  module VersionProxy
6
6
  MAJOR = 1
7
7
  MINOR = 6
8
- TINY = 5
8
+ TINY = 6
9
9
  BUILD = nil
10
10
 
11
11
  STRING = [ MAJOR, MINOR, TINY, BUILD ].compact.join( "." )
@@ -16,7 +16,7 @@ module SQLite3
16
16
  def self.const_missing(name)
17
17
  return super unless name == :Version
18
18
  warn(<<-eowarn) if $VERBOSE
19
- #{caller[0]}: SQLite::Version will be removed in sqlite3-ruby version 2.0.0
19
+ #{caller[0]}: `SQLite::Version` will be removed in sqlite3-ruby version 2.0.0
20
20
  eowarn
21
21
  VersionProxy
22
22
  end
@@ -101,15 +101,20 @@ module SQLite3
101
101
 
102
102
  def test_get_first_row_with_type_translation_and_hash_results
103
103
  @db.results_as_hash = true
104
- @db.type_translation = true
105
- assert_equal({"1"=>1}, @db.get_first_row('SELECT 1'))
104
+ capture_io do # hush translation deprecation warnings
105
+ @db.type_translation = true
106
+ assert_equal({"1"=>1}, @db.get_first_row('SELECT 1'))
107
+ end
106
108
  end
107
109
 
108
110
  def test_execute_with_type_translation_and_hash
109
- @db.results_as_hash = true
110
- @db.type_translation = true
111
111
  rows = []
112
- @db.execute('SELECT 1') { |row| rows << row }
112
+ @db.results_as_hash = true
113
+
114
+ capture_io do # hush translation deprecation warnings
115
+ @db.type_translation = true
116
+ @db.execute('SELECT 1') { |row| rows << row }
117
+ end
113
118
 
114
119
  assert_equal({"1"=>1}, rows.first)
115
120
  end
@@ -565,5 +570,16 @@ module SQLite3
565
570
  assert_raises(TypeError) { db.load_extension(1) }
566
571
  assert_raises(TypeError) { db.load_extension(Pathname.new("foo.so")) }
567
572
  end
573
+
574
+ def test_raw_float_infinity
575
+ # https://github.com/sparklemotion/sqlite3-ruby/issues/396
576
+ skip if SQLite3::SQLITE_LOADED_VERSION >= "3.43.0"
577
+
578
+ db = SQLite3::Database.new ":memory:"
579
+ db.execute("create table foo (temperature float)")
580
+ db.execute("insert into foo values (?)", 37.5)
581
+ db.execute("insert into foo values (?)", Float::INFINITY)
582
+ assert_equal Float::INFINITY, db.execute("select avg(temperature) from foo").first.first
583
+ end
568
584
  end
569
585
  end
@@ -101,8 +101,8 @@ class TC_ResultSet < SQLite3::TestCase
101
101
  hash = @result.next
102
102
  assert_equal( { "a" => 1, "b" => "foo" },
103
103
  hash )
104
- assert_equal hash[0], 1
105
- assert_equal hash[1], "foo"
104
+ assert_equal hash[@result.columns[0]], 1
105
+ assert_equal hash[@result.columns[1]], "foo"
106
106
  end
107
107
 
108
108
  def test_each
@@ -140,7 +140,9 @@ module SQLite3
140
140
  stmt.close
141
141
 
142
142
  assert_equal ['hello'], row.first
143
- assert_equal ['blob'], row.first.types
143
+ capture_io do # hush deprecation warning
144
+ assert_equal ['blob'], row.first.types
145
+ end
144
146
  end
145
147
 
146
148
  def test_bind_64
metadata CHANGED
@@ -1,23 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.5
4
+ version: 1.6.6
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Jamis Buck
8
8
  - Luis Lavena
9
9
  - Aaron Patterson
10
+ - Mike Dalessio
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2023-09-09 00:00:00.000000000 Z
14
+ date: 2023-09-12 00:00:00.000000000 Z
14
15
  dependencies: []
15
- description: |-
16
- This module allows Ruby programs to interface with the SQLite3
17
- database engine (http://www.sqlite.org). You must have the
18
- SQLite engine installed in order to build this module.
19
-
20
- Note that this module is only compatible with SQLite 3.6.16 or newer.
16
+ description: |
17
+ Ruby library to interface with the SQLite3 database engine (http://www.sqlite.org). Precompiled
18
+ binaries are available for common platforms for recent versions of Ruby.
21
19
  email:
22
20
  executables: []
23
21
  extensions: []
@@ -122,6 +120,5 @@ requirements: []
122
120
  rubygems_version: 3.3.26
123
121
  signing_key:
124
122
  specification_version: 4
125
- summary: This module allows Ruby programs to interface with the SQLite3 database engine
126
- (http://www.sqlite.org)
123
+ summary: Ruby library to interface with the SQLite3 database engine (http://www.sqlite.org).
127
124
  test_files: []