extralite-bundle 2.1 → 2.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 +4 -4
- data/.github/workflows/test.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/ext/extralite/common.c +3 -1
- data/ext/extralite/database.c +2 -0
- data/ext/extralite/extralite.h +3 -0
- data/ext/sqlite3/sqlite3.c +8785 -3803
- data/ext/sqlite3/sqlite3.h +240 -51
- data/lib/extralite/version.rb +1 -1
- data/lib/sequel/adapters/extralite.rb +5 -1
- data/test/test_database.rb +7 -0
- data/test/test_iterator.rb +13 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 895ecb7a24fcd505422476e1f1d58f181f751d8334c49dd3941a1f88f96e8e68
|
4
|
+
data.tar.gz: ca6ba409797e34462dd0ef319e4e39340aac2ea92bb4f8a4d7890f88b546cb42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc81369fc178ca02d18bc7acaa6161d1b7f97bb56b28824799dd9d10fd037a402461b4cceca1efc6ceb0041966bfc5d61f221fa382d5d8067aa0a7b4b1f40422
|
7
|
+
data.tar.gz: 8e75931fba409f7f5c6ce977b57c28bf9c254f535a7794c3bb80526b4f86aba74cde0dad3e5ed69a1ea9ebb0ce7e3ad8520b9965b703f19785edab923e9d840e
|
data/.github/workflows/test.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
# 2.3 2023-11-12
|
2
|
+
|
3
|
+
- Update bundled SQLite to version 3.44.0 (#29)
|
4
|
+
|
5
|
+
# 2.2 2023-10-14
|
6
|
+
|
7
|
+
- Set correct encoding for strings values in query results (#27)
|
8
|
+
- Reset query after running it in Sequel adapter (#26)
|
9
|
+
|
1
10
|
# 2.1 2023-07-11
|
2
11
|
|
3
12
|
- Implement `Database#execute`, `Query#execute` for data-manipulation queries
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
extralite (2.
|
4
|
+
extralite (2.3)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
@@ -9,7 +9,7 @@ GEM
|
|
9
9
|
docile (1.4.0)
|
10
10
|
json (2.6.3)
|
11
11
|
minitest (5.15.0)
|
12
|
-
rake (13.0
|
12
|
+
rake (13.1.0)
|
13
13
|
rake-compiler (1.1.6)
|
14
14
|
rake
|
15
15
|
sequel (5.51.0)
|
data/README.md
CHANGED
@@ -14,7 +14,7 @@ with an SQLite3 database, as well as prepared queries (prepared statements).
|
|
14
14
|
Extralite comes in two flavors: the `extralite` gem which uses the
|
15
15
|
system-installed sqlite3 library, and the `extralite-bundle` gem which bundles
|
16
16
|
the latest version of SQLite
|
17
|
-
([3.
|
17
|
+
([3.44.0](https://sqlite.org/releaselog/3_44_0.html)), offering access to the
|
18
18
|
latest features and enhancements.
|
19
19
|
|
20
20
|
## Features
|
data/ext/extralite/common.c
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
#include <stdio.h>
|
2
2
|
#include "extralite.h"
|
3
3
|
|
4
|
+
rb_encoding *UTF8_ENCODING;
|
5
|
+
|
4
6
|
static inline VALUE get_column_value(sqlite3_stmt *stmt, int col, int type) {
|
5
7
|
switch (type) {
|
6
8
|
case SQLITE_NULL:
|
@@ -10,7 +12,7 @@ static inline VALUE get_column_value(sqlite3_stmt *stmt, int col, int type) {
|
|
10
12
|
case SQLITE_FLOAT:
|
11
13
|
return DBL2NUM(sqlite3_column_double(stmt, col));
|
12
14
|
case SQLITE_TEXT:
|
13
|
-
return
|
15
|
+
return rb_enc_str_new((char *)sqlite3_column_text(stmt, col), (long)sqlite3_column_bytes(stmt, col), UTF8_ENCODING);
|
14
16
|
case SQLITE_BLOB:
|
15
17
|
return rb_str_new((const char *)sqlite3_column_blob(stmt, col), (long)sqlite3_column_bytes(stmt, col));
|
16
18
|
default:
|
data/ext/extralite/database.c
CHANGED
data/ext/extralite/extralite.h
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
|
4
4
|
#include "ruby.h"
|
5
5
|
#include "ruby/thread.h"
|
6
|
+
#include "ruby/encoding.h"
|
6
7
|
|
7
8
|
#ifdef EXTRALITE_NO_BUNDLE
|
8
9
|
#include <sqlite3.h>
|
@@ -92,6 +93,8 @@ typedef struct {
|
|
92
93
|
#define QUERY_MODE(default) (rb_block_given_p() ? QUERY_YIELD : default)
|
93
94
|
#define MULTI_ROW_P(mode) (mode == QUERY_MULTI_ROW)
|
94
95
|
|
96
|
+
extern rb_encoding *UTF8_ENCODING;
|
97
|
+
|
95
98
|
VALUE safe_execute_multi(query_ctx *ctx);
|
96
99
|
VALUE safe_query_ary(query_ctx *ctx);
|
97
100
|
VALUE safe_query_changes(query_ctx *ctx);
|