extralite-bundle 2.8 → 2.8.2
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-bundle.yml +6 -4
- data/.github/workflows/test.yml +5 -3
- data/CHANGELOG.md +10 -0
- data/README.md +1 -1
- data/examples/pubsub_store_polyphony.rb +5 -5
- data/ext/extralite/database.c +6 -0
- data/ext/sqlite3/sqlite3.c +5586 -3549
- data/ext/sqlite3/sqlite3.h +93 -23
- data/lib/extralite/version.rb +1 -1
- data/test/extensions/{text.dylib → arm64/text.dylib} +0 -0
- data/test/extensions/arm64/text.so +0 -0
- data/test/extensions/x86/text.dylib +0 -0
- data/test/extensions/x86/text.so +0 -0
- data/test/test_database.rb +53 -7
- metadata +6 -4
- data/test/extensions/text.so +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5308b46b6b15860563f1ae4064e0be95da162885743940a8aa8e9f24e7abfb6f
|
4
|
+
data.tar.gz: a4a672e3a45b1cb47f819ebdb288d04bcf5a78af630da28108a67adc1b9994be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 625acad5183577de37248ccfdffc5184d25aee62235b0862378e8199c2738f68fa2bd37187f0eb5a03d45c0d0a3a8dfb33569bf0141915d745bf185c47b58d67
|
7
|
+
data.tar.gz: 25655a268ff6bd068c782488ea66e90d19f78483206a5ac0560c9eb157d13e09459e11522eaae3c8281090797538f8bace09f05e99a2e0f871bd6238e6b750b0
|
@@ -11,11 +11,13 @@ jobs:
|
|
11
11
|
strategy:
|
12
12
|
fail-fast: false
|
13
13
|
matrix:
|
14
|
-
|
15
|
-
|
14
|
+
# macos-latest uses arm64, macos-13 uses x86
|
15
|
+
os: [ubuntu-latest, macos-latest, macos-13]
|
16
|
+
ruby: ['3.0', '3.1', '3.2', '3.3', 'head']
|
16
17
|
|
17
|
-
name:
|
18
|
-
|
18
|
+
name: ${{matrix.os}}, ${{matrix.ruby}}
|
19
|
+
|
20
|
+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
19
21
|
|
20
22
|
runs-on: ${{matrix.os}}
|
21
23
|
steps:
|
data/.github/workflows/test.yml
CHANGED
@@ -11,11 +11,13 @@ jobs:
|
|
11
11
|
strategy:
|
12
12
|
fail-fast: false
|
13
13
|
matrix:
|
14
|
-
|
14
|
+
# macos-latest uses arm64, macos-13 uses x86
|
15
|
+
os: [ubuntu-latest, macos-latest, macos-13]
|
15
16
|
ruby: ['3.0', '3.1', '3.2', '3.3', 'head']
|
16
17
|
|
17
|
-
name:
|
18
|
-
|
18
|
+
name: ${{matrix.os}}, ${{matrix.ruby}}
|
19
|
+
|
20
|
+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
|
19
21
|
|
20
22
|
runs-on: ${{matrix.os}}
|
21
23
|
steps:
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
## 2.8.2 2024-06-02
|
2
|
+
|
3
|
+
- Update bundled SQLite to version 3.46.0
|
4
|
+
|
5
|
+
## 2.8.1 2024-04-15
|
6
|
+
|
7
|
+
- Update bundled sqlite to version 3.45.3.
|
8
|
+
- Fix `Database#execute` for SQL ending with a comment.
|
9
|
+
[#72](https://github.com/digital-fabric/extralite/pull/72)
|
10
|
+
|
1
11
|
# 2.8 2024-03-10
|
2
12
|
|
3
13
|
- Improve documentation.
|
data/README.md
CHANGED
@@ -32,7 +32,7 @@ databases.
|
|
32
32
|
Extralite comes in two flavors: the `extralite` gem which uses the
|
33
33
|
system-installed sqlite3 library, and the `extralite-bundle` gem which bundles
|
34
34
|
the latest version of SQLite
|
35
|
-
([3.
|
35
|
+
([3.46.0](https://sqlite.org/releaselog/3_46_0.html)), offering access to the
|
36
36
|
latest features and enhancements.
|
37
37
|
|
38
38
|
## Features
|
@@ -103,9 +103,9 @@ db2.pragma(journal_mode: :wal, synchronous: 1)
|
|
103
103
|
db3 = Extralite::Database.new(fn)
|
104
104
|
db3.pragma(journal_mode: :wal, synchronous: 1)
|
105
105
|
|
106
|
-
db1.on_progress
|
107
|
-
db2.on_progress
|
108
|
-
db3.on_progress
|
106
|
+
db1.on_progress { |b| b ? sleep(0.0001) : snooze }
|
107
|
+
db2.on_progress { |b| b ? sleep(0.0001) : snooze }
|
108
|
+
db3.on_progress { |b| b ? sleep(0.0001) : snooze }
|
109
109
|
|
110
110
|
producer = PubSub.new(db1)
|
111
111
|
producer.setup
|
@@ -163,7 +163,7 @@ end
|
|
163
163
|
|
164
164
|
db4 = Extralite::Database.new(fn)
|
165
165
|
db4.pragma(journal_mode: :wal, synchronous: 1)
|
166
|
-
db4.on_progress
|
166
|
+
db4.on_progress { |busy| busy ? sleep(0.05) : snooze }
|
167
167
|
|
168
168
|
last_t = Time.now
|
169
169
|
last_publish_count = 0
|
@@ -175,7 +175,7 @@ while true
|
|
175
175
|
d_publish = publish_count - last_publish_count
|
176
176
|
d_receive = receive_count - last_receive_count
|
177
177
|
pending = db4.query_single_splat('select count(*) from messages')
|
178
|
-
puts "#{Time.now} publish: #{d_publish/elapsed}/s receive: #{d_receive/elapsed}/s pending: #{pending}"
|
178
|
+
puts "#{Time.now} publish: #{(d_publish/elapsed).round}/s receive: #{(d_receive/elapsed).round}/s pending: #{pending} latency: #{pending / (d_receive/elapsed)}"
|
179
179
|
last_t = now
|
180
180
|
last_publish_count = publish_count
|
181
181
|
last_receive_count = receive_count
|
data/ext/extralite/database.c
CHANGED
@@ -294,6 +294,8 @@ static inline VALUE Database_perform_query(int argc, VALUE *argv, VALUE self, VA
|
|
294
294
|
prepare_multi_stmt(DB_GVL_MODE(db), db->sqlite3_db, &stmt, sql);
|
295
295
|
RB_GC_GUARD(sql);
|
296
296
|
|
297
|
+
if (stmt == NULL) return Qnil;
|
298
|
+
|
297
299
|
bind_all_parameters(stmt, argc - 1, argv + 1);
|
298
300
|
query_ctx ctx = QUERY_CTX(
|
299
301
|
self, sql, db, stmt, Qnil, transform,
|
@@ -485,6 +487,10 @@ VALUE Database_query_single_array(int argc, VALUE *argv, VALUE self) {
|
|
485
487
|
* specified using keyword arguments:
|
486
488
|
*
|
487
489
|
* db.execute('update foo set x = :bar', bar: 42)
|
490
|
+
*
|
491
|
+
* @param sql [String] query SQL
|
492
|
+
* @param parameters [Array, Hash] parameters to run query with
|
493
|
+
* @return [Integer, nil] Total number of changes effected or `nil` if the query ends with a comment.
|
488
494
|
*/
|
489
495
|
VALUE Database_execute(int argc, VALUE *argv, VALUE self) {
|
490
496
|
return Database_perform_query(argc, argv, self, safe_query_changes, QUERY_HASH);
|