sqlite3-ffi 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f6057cc11c164cee5826611c884086b9b2c1e624b168bb0f141a8f0527cea6c6
4
- data.tar.gz: cb0fc326b3b60ddccf66d76487397bedf3dc7af6246e97eb29812c685a089ace
3
+ metadata.gz: 5ec2a920f1564588b726a6f07933599e4ca6765629e4e09dad0a16fdd468aae2
4
+ data.tar.gz: f19c33deca3d40e25d6769f12081f55b113c8fb2a7457d8f2293a7dce86bc614
5
5
  SHA512:
6
- metadata.gz: e5741192faba70b8e6c18535642a14f652e9dabdb55d9279a8f4706397bf19a1f53a64dc33acd524852015d317e69c548886691b20715c07bdad91377e594dcd
7
- data.tar.gz: a3a9ec82f458c9aff089fd3e555a86f6691db6e3992917eab43c2734a8b6f9dae1022c9dba4141b4111e6a1fbbc2fe23188af0b865e599988b6484c8901000aa
6
+ metadata.gz: e451c2b5ef9a4dbf36ae0ee1388092c26f8a7dc9e4126d073e2d0dfbe2b328b7dc40f58a51000dd3b155a8315c96ccc0e8493b5d2dd6a69785c6dafaf29ee759
7
+ data.tar.gz: e079587aea5442f2700767172f803353f0ebf9dad1f49c00e1f7e256c7d9696587a602eef2b9b2390ea1ecd9ac98f3c5be0ab560f25a1cb456926d8a37af0ce8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.1.1 (2025-04-26)
2
+
3
+ - Fixed error with `load_extension` method
4
+
1
5
  ## 0.1.0 (2025-04-25)
2
6
 
3
7
  - First release
data/README.md CHANGED
@@ -15,11 +15,11 @@ Add this line to your Gemfile:
15
15
  gem "sqlite3-ffi"
16
16
  ```
17
17
 
18
- And use it the exact same way as the sqlite3 gem.
18
+ And use it the same way as the sqlite3 gem.
19
19
 
20
20
  ## Why FFI for JRuby?
21
21
 
22
- I tried [JDBC](https://github.com/xerial/sqlite-jdbc), [JNI](https://sqlite.org/src/dir/ext/jni), and FFI. Since SQLite is written in C, all three approaches eventually call C, but FFI provides the most compatibility.
22
+ I tried [JDBC](https://github.com/xerial/sqlite-jdbc), [JNI](https://sqlite.org/src/dir/ext/jni), and FFI. Since SQLite is written in C, all three approaches eventually call C, and FFI provides the most compatibility.
23
23
 
24
24
  ## Credits
25
25
 
@@ -204,7 +204,7 @@ module SQLite3
204
204
  end
205
205
 
206
206
  HAVE_SQLITE3_LOAD_EXTENSION = begin
207
- attach_function :sqlite3_load_extension, [:pointer, :string, :string, :pointer], :int
207
+ attach_function :sqlite3_load_extension, [:pointer, :string, :pointer, :pointer], :int
208
208
  true
209
209
  rescue ::FFI::NotFoundError
210
210
  false
@@ -220,8 +220,8 @@ module SQLite3
220
220
  def load_extension_internal(file)
221
221
  require_open_db
222
222
 
223
- err_msg = FFI::MemoryPointer.new(:pointer)
224
- status = FFI::CApi.sqlite3_load_extension(@db, FFI.string_value(file), 0, err_msg)
223
+ err_msg = ::FFI::MemoryPointer.new(:pointer)
224
+ status = FFI::CApi.sqlite3_load_extension(@db, FFI.string_value(file), nil, err_msg)
225
225
  FFI.check_msg(@db, status, err_msg)
226
226
  self
227
227
  end
@@ -56,6 +56,7 @@ module SQLite3
56
56
  current_time = Process.clock_gettime(Process::CLOCK_MONOTONIC)
57
57
  if ctx.instance_variable_get(:@stmt_deadline).nil?
58
58
  ctx.instance_variable_set(:@stmt_deadline, current_time)
59
+ 0
59
60
  elsif current_time >= ctx.instance_variable_get(:@stmt_deadline)
60
61
  1
61
62
  else
@@ -1,5 +1,5 @@
1
1
  module SQLite3
2
2
  module FFI
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlite3-ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamis Buck
@@ -9,10 +9,9 @@ authors:
9
9
  - Aaron Patterson
10
10
  - Mike Dalessio
11
11
  - Andrew Kane
12
- autorequire:
13
12
  bindir: bin
14
13
  cert_chain: []
15
- date: 2025-04-26 00:00:00.000000000 Z
14
+ date: 1980-01-02 00:00:00.000000000 Z
16
15
  dependencies:
17
16
  - !ruby/object:Gem::Dependency
18
17
  name: ffi
@@ -28,7 +27,6 @@ dependencies:
28
27
  - - ">="
29
28
  - !ruby/object:Gem::Version
30
29
  version: '0'
31
- description:
32
30
  email: andrew@ankane.org
33
31
  executables: []
34
32
  extensions: []
@@ -65,7 +63,6 @@ homepage: https://github.com/ankane/sqlite3-ffi
65
63
  licenses:
66
64
  - BSD-3-Clause
67
65
  metadata: {}
68
- post_install_message:
69
66
  rdoc_options: []
70
67
  require_paths:
71
68
  - lib
@@ -80,8 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
77
  - !ruby/object:Gem::Version
81
78
  version: '0'
82
79
  requirements: []
83
- rubygems_version: 3.5.16
84
- signing_key:
80
+ rubygems_version: 3.6.7
85
81
  specification_version: 4
86
82
  summary: A drop-in replacement for sqlite3 for JRuby
87
83
  test_files: []