lora-ruby 0.3.0-x86_64-linux → 0.4.0-x86_64-linux
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/README.md +27 -3
- data/lib/lora_ruby/3.1/lora_ruby.so +0 -0
- data/lib/lora_ruby/3.2/lora_ruby.so +0 -0
- data/lib/lora_ruby/3.3/lora_ruby.so +0 -0
- data/lib/lora_ruby/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 56ecc108e6296c299d4c4a88ff9cc6c457e7f4969804a70aad7b411f2c51e4a3
|
|
4
|
+
data.tar.gz: 9581c66e79f86c057f663e09528238b907f97f13182d412e741fb6ca4216d95c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b5e72d52e5e2dab1b409f2576fbf5905cb1de0a5ba8d5646543f8cec963576bef2dff421d442790165debe93bab2470e6cac3fab6864efdc591e31ebf8c429a7
|
|
7
|
+
data.tar.gz: 047d5d1da597d45117f56239afc340d8336bd0c4c4609a90f977cf9450d6e5217b80d7741a74b17917b25fc3654b9307718d15c0d44670e65663905e15d804c9
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# lora-ruby
|
|
2
2
|
|
|
3
|
-
Ruby bindings for the [Lora](../../README.md)
|
|
3
|
+
Ruby bindings for the [Lora](../../README.md) graph engine.
|
|
4
4
|
Ships a native extension built with [Magnus](https://github.com/matsadler/magnus)
|
|
5
5
|
on top of [`rb-sys`](https://github.com/oxidize-rb/rb-sys) so the Rust
|
|
6
6
|
engine runs in-process — no separate server, no socket hop.
|
|
@@ -39,6 +39,16 @@ result["rows"].each do |row|
|
|
|
39
39
|
end
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
+
Initialization rule:
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
scratch = LoraRuby::Database.create # in-memory
|
|
46
|
+
persistent = LoraRuby::Database.create("./app") # persistent: directory string
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
If you want persistence, pass a directory string to
|
|
50
|
+
`LoraRuby::Database.create(...)` or `LoraRuby::Database.new(...)`.
|
|
51
|
+
|
|
42
52
|
### Params
|
|
43
53
|
|
|
44
54
|
`execute` accepts a second argument — either `nil` or a `Hash` keyed by
|
|
@@ -66,8 +76,8 @@ binding's `lora_python.Database` and because it mirrors the
|
|
|
66
76
|
## Public API
|
|
67
77
|
|
|
68
78
|
```ruby
|
|
69
|
-
LoraRuby::Database.create
|
|
70
|
-
LoraRuby::Database.new
|
|
79
|
+
LoraRuby::Database.create(wal_dir = nil) # -> Database
|
|
80
|
+
LoraRuby::Database.new(wal_dir = nil) # -> Database (alias of .create)
|
|
71
81
|
|
|
72
82
|
db.execute(query, params = nil) # -> { "columns" => [...], "rows" => [...] }
|
|
73
83
|
db.clear # -> nil
|
|
@@ -136,6 +146,20 @@ db.execute(
|
|
|
136
146
|
- `LoraRuby::QueryError` — parse / analyze / execute failure.
|
|
137
147
|
- `LoraRuby::InvalidParamsError` — a parameter value couldn't be mapped.
|
|
138
148
|
|
|
149
|
+
## Persistence
|
|
150
|
+
|
|
151
|
+
`LoraRuby::Database.create("./app")` and
|
|
152
|
+
`LoraRuby::Database.new("./app")` open or create a WAL-backed
|
|
153
|
+
persistent database rooted at that directory. Reopening the same path
|
|
154
|
+
replays committed writes before returning the handle.
|
|
155
|
+
|
|
156
|
+
Call `db.close` before reopening the same WAL directory inside one
|
|
157
|
+
process.
|
|
158
|
+
|
|
159
|
+
This first Ruby persistence slice intentionally stays small: the
|
|
160
|
+
binding exposes WAL-backed initialization plus the existing snapshot
|
|
161
|
+
APIs, but not checkpoint, truncate, status, or sync-mode controls.
|
|
162
|
+
|
|
139
163
|
## Concurrency (GVL release)
|
|
140
164
|
|
|
141
165
|
`Database#execute` calls `rb_thread_call_without_gvl`, so other Ruby
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/lora_ruby/version.rb
CHANGED
|
@@ -10,5 +10,5 @@ module LoraRuby
|
|
|
10
10
|
# Guard against redefinition so re-requiring this file (or loading
|
|
11
11
|
# both paths) doesn't emit a "warning: already initialized constant"
|
|
12
12
|
# when the native extension loads second with the identical value.
|
|
13
|
-
VERSION = "0.
|
|
13
|
+
VERSION = "0.4.0" unless const_defined?(:VERSION)
|
|
14
14
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lora-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: x86_64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- LoraDB, Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04-
|
|
11
|
+
date: 2026-04-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|