extralite 1.10 → 1.11

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: e1dbf79f19c8e1a1b31da57db9e1b20eb32efed2a510dfd1a19df048ecdf6532
4
- data.tar.gz: 633afbfd7042dedb38a5275d525bf9876a8cd194e6b6f95db183d78019c53816
3
+ metadata.gz: d88bd81eca07e148be1f8d5b07d24c0aab49b32a9dc9aeb4a9ea5a74cf769491
4
+ data.tar.gz: 9f5d55a8cd4a58e2026ca3e850d48c28d86878e191e91fb92e59c76335a64484
5
5
  SHA512:
6
- metadata.gz: 9987a2e1b14e9213a289d04d79a0914e6d3a843c5af94e4d57d6839f193b8294b57b280141dd4784419d9f920d8b1ee32f9a21efee56a85ff524128bc4262aed
7
- data.tar.gz: 2b53f9dd796f37e7c901f88b5bfe2b28463c0465ff5aaf0ade160b1ecf95f0beb7b0cd56496e3c76bd4f754ef7649bf8a704ff7eb94053a7b7f1b1099cf31a5b
6
+ metadata.gz: cca614a4e3ffde8ff56ef3e8394f85f4a57d37f8615f2f144a9a39f84d50e51dd015348da7f93340326b40ff4b16202ec21bc03f23edacf678c03f57d0955974
7
+ data.tar.gz: 2e9f9c9091ac99fa96c3562fdb1e49642b2961ee682c30d98f8babd95b8366d9c96019df7185c5ef493b330f6c32066be6868398dcdb123c4607e9ab4875462b
@@ -7,7 +7,7 @@ jobs:
7
7
  strategy:
8
8
  fail-fast: false
9
9
  matrix:
10
- os: [ubuntu-latest]
10
+ os: [ubuntu-latest, macos-10.15]
11
11
  ruby: [2.6, 2.7, '3.0']
12
12
 
13
13
  name: >-
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.11 2021-12-17
2
+
3
+ - Fix compilation on MacOS (#3)
4
+
1
5
  ## 1.10 2021-12-15
2
6
 
3
7
  - Fix mutliple parameter binding with hash
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- extralite (1.10)
4
+ extralite (1.11)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,8 +1,25 @@
1
- # Extralite - a fast Ruby gem for working with SQLite3 databases
2
-
3
- [![Gem Version](https://badge.fury.io/rb/extralite.svg)](http://rubygems.org/gems/extralite)
4
- [![Modulation Test](https://github.com/digital-fabric/extralite/workflows/Tests/badge.svg)](https://github.com/digital-fabric/extralite/actions?query=workflow%3ATests)
5
- [![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/digital-fabric/extralite/blob/master/LICENSE)
1
+ <h1 align="center">
2
+ Extralite
3
+ </h1>
4
+
5
+ <h4 align="center">A fast Ruby gem for working with SQLite3 databases</h4>
6
+
7
+ <p align="center">
8
+ <a href="http://rubygems.org/gems/extralite">
9
+ <img src="https://badge.fury.io/rb/extralite.svg" alt="Ruby gem">
10
+ </a>
11
+ <a href="https://github.com/digital-fabric/extralite/actions?query=workflow%3ATests">
12
+ <img src="https://github.com/digital-fabric/extralite/workflows/Tests/badge.svg" alt="Tests">
13
+ </a>
14
+ <a href="https://github.com/digital-fabric/extralite/blob/master/LICENSE">
15
+ <img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="MIT License">
16
+ </a>
17
+ </p>
18
+
19
+ <p align="center">
20
+ <a href="https://www.rubydoc.info/gems/extralite">DOCS</a> |
21
+ <a href="https://noteflakes.com/articles/2021-12-15-extralite">BLOG POST</a>
22
+ </p>
6
23
 
7
24
  ## What is Extralite?
8
25
 
@@ -105,7 +105,7 @@ VALUE Database_closed_p(VALUE self) {
105
105
  return db->sqlite3_db ? Qfalse : Qtrue;
106
106
  }
107
107
 
108
- inline VALUE get_column_value(sqlite3_stmt *stmt, int col, int type) {
108
+ static inline VALUE get_column_value(sqlite3_stmt *stmt, int col, int type) {
109
109
  switch (type) {
110
110
  case SQLITE_NULL:
111
111
  return Qnil;
@@ -128,8 +128,8 @@ static void bind_parameter_value(sqlite3_stmt *stmt, int pos, VALUE value);
128
128
 
129
129
  static inline void bind_hash_parameter_values(sqlite3_stmt *stmt, VALUE hash) {
130
130
  VALUE keys = rb_funcall(hash, ID_KEYS, 0);
131
- int len = RARRAY_LEN(keys);
132
- for (int i = 0; i < len; i++) {
131
+ long len = RARRAY_LEN(keys);
132
+ for (long i = 0; i < len; i++) {
133
133
  VALUE k = RARRAY_AREF(keys, i);
134
134
  VALUE v = rb_hash_aref(hash, k);
135
135
 
@@ -145,7 +145,7 @@ static inline void bind_hash_parameter_values(sqlite3_stmt *stmt, VALUE hash) {
145
145
  bind_parameter_value(stmt, pos, v);
146
146
  break;
147
147
  default:
148
- rb_raise(cError, "Cannot bind hash key value idx %d", i);
148
+ rb_raise(cError, "Cannot bind hash key value idx %ld", i);
149
149
  }
150
150
  }
151
151
  RB_GC_GUARD(keys);
@@ -218,7 +218,7 @@ struct multi_stmt_ctx {
218
218
  sqlite3 *db;
219
219
  sqlite3_stmt **stmt;
220
220
  const char *str;
221
- int len;
221
+ long len;
222
222
  int rc;
223
223
  };
224
224
 
@@ -256,7 +256,7 @@ statements. It will release the GVL while the statements are being prepared and
256
256
  executed. All statements excluding the last one are executed. The last statement
257
257
  is not executed, but instead handed back to the caller for looping over results.
258
258
  */
259
- inline void prepare_multi_stmt(sqlite3 *db, sqlite3_stmt **stmt, VALUE sql) {
259
+ static inline void prepare_multi_stmt(sqlite3 *db, sqlite3_stmt **stmt, VALUE sql) {
260
260
  struct multi_stmt_ctx ctx = {db, stmt, RSTRING_PTR(sql), RSTRING_LEN(sql), 0};
261
261
  rb_thread_call_without_gvl(prepare_multi_stmt_without_gvl, (void *)&ctx, RUBY_UBF_IO, 0);
262
262
  RB_GC_GUARD(sql);
@@ -284,7 +284,7 @@ void *stmt_iterate_without_gvl(void *ptr) {
284
284
  return NULL;
285
285
  }
286
286
 
287
- inline int stmt_iterate(sqlite3_stmt *stmt, sqlite3 *db) {
287
+ static inline int stmt_iterate(sqlite3_stmt *stmt, sqlite3 *db) {
288
288
  struct step_ctx ctx = {stmt, 0};
289
289
  rb_thread_call_without_gvl(stmt_iterate_without_gvl, (void *)&ctx, RUBY_UBF_IO, 0);
290
290
  switch (ctx.rc) {
@@ -1,3 +1,3 @@
1
1
  module Extralite
2
- VERSION = '1.10'
2
+ VERSION = '1.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extralite
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.10'
4
+ version: '1.11'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-15 00:00:00.000000000 Z
11
+ date: 2021-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler