sqlite3 1.6.5-x86_64-linux → 1.6.6-x86_64-linux
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/CONTRIBUTING.md +2 -1
- data/Gemfile +5 -5
- data/dependencies.yml +7 -7
- data/ext/sqlite3/database.c +3 -3
- data/ext/sqlite3/statement.c +2 -2
- data/lib/sqlite3/2.7/sqlite3_native.so +0 -0
- data/lib/sqlite3/3.0/sqlite3_native.so +0 -0
- data/lib/sqlite3/3.1/sqlite3_native.so +0 -0
- data/lib/sqlite3/3.2/sqlite3_native.so +0 -0
- data/lib/sqlite3/database.rb +5 -15
- data/lib/sqlite3/resultset.rb +4 -12
- data/lib/sqlite3/translator.rb +1 -2
- data/lib/sqlite3/version.rb +3 -3
- data/test/test_database.rb +21 -5
- data/test/test_integration_resultset.rb +2 -2
- data/test/test_statement.rb +3 -1
- metadata +7 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8ecd67fe51059cf28f9254401562b49817a3a630b8b0772bb65ef66d12c6bb5
|
4
|
+
data.tar.gz: b396cdea1d6a82b4bc0c997577bd27755962b465a0f842a92f906d2094eda759
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0776db7e275cec40fb65bfc2cb9866ecbd3e63cdf534704b5c269060c59c4b7ba49b7f6192151401d2339d6eacf9d2e48eeb59b45ef590f35c692d718eeb9f60
|
7
|
+
data.tar.gz: 67be2e4b1b4ffad6d0fcab3fe044277d31c498fb0f14feeb0b3a11d9e328991c420fc00aa6a86027e2dcd2aed86414982f9b38cef21ff92b4bcdd650e37034d3
|
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", "
|
6
|
-
gem("rake-compiler", "
|
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", "
|
9
|
-
gem("psych", "
|
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-
|
6
|
-
#
|
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-
|
9
|
-
#
|
8
|
+
# $ sha256sum ports/archives/sqlite-autoconf-3430100.tar.gz
|
9
|
+
# 46db2f10f306e163e4571b8974d44cd37078aae04295bbf08b253655df3265f4 ports/archives/sqlite-autoconf-3430100.tar.gz
|
10
10
|
#
|
11
|
-
:version: "3.43.
|
11
|
+
:version: "3.43.1"
|
12
12
|
:files:
|
13
|
-
- :url: "https://sqlite.org/2023/sqlite-autoconf-
|
14
|
-
:sha256: "
|
13
|
+
- :url: "https://sqlite.org/2023/sqlite-autoconf-3430100.tar.gz"
|
14
|
+
:sha256: "46db2f10f306e163e4571b8974d44cd37078aae04295bbf08b253655df3265f4"
|
data/ext/sqlite3/database.c
CHANGED
@@ -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(
|
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(
|
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(
|
416
|
+
return INT2NUM(sqlite3_errcode(ctx->db));
|
417
417
|
}
|
418
418
|
|
419
419
|
/* call-seq: complete?(sql)
|
data/ext/sqlite3/statement.c
CHANGED
@@ -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(
|
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(
|
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
|
Binary file
|
Binary file
|
data/lib/sqlite3/database.rb
CHANGED
@@ -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
|
|
data/lib/sqlite3/resultset.rb
CHANGED
@@ -20,18 +20,14 @@ module SQLite3
|
|
20
20
|
|
21
21
|
def types
|
22
22
|
warn(<<-eowarn) if $VERBOSE
|
23
|
-
#{caller[0]} is calling
|
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
|
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
|
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
|
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
|
data/lib/sqlite3/translator.rb
CHANGED
@@ -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
|
data/lib/sqlite3/version.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module SQLite3
|
2
2
|
|
3
|
-
VERSION = "1.6.
|
3
|
+
VERSION = "1.6.6"
|
4
4
|
|
5
5
|
module VersionProxy
|
6
6
|
MAJOR = 1
|
7
7
|
MINOR = 6
|
8
|
-
TINY =
|
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
|
data/test/test_database.rb
CHANGED
@@ -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
|
-
|
105
|
-
|
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.
|
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
|
data/test/test_statement.rb
CHANGED
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.
|
4
|
+
version: 1.6.6
|
5
5
|
platform: x86_64-linux
|
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-
|
14
|
+
date: 2023-09-12 00:00:00.000000000 Z
|
14
15
|
dependencies: []
|
15
|
-
description:
|
16
|
-
|
17
|
-
|
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: []
|
@@ -124,6 +122,5 @@ requirements: []
|
|
124
122
|
rubygems_version: 3.3.26
|
125
123
|
signing_key:
|
126
124
|
specification_version: 4
|
127
|
-
summary:
|
128
|
-
(http://www.sqlite.org)
|
125
|
+
summary: Ruby library to interface with the SQLite3 database engine (http://www.sqlite.org).
|
129
126
|
test_files: []
|