lora-ruby 0.5.6-aarch64-linux → 0.6.0-aarch64-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 +16 -5
- 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/types.rb +17 -1
- data/lib/lora_ruby/version.rb +1 -1
- data/lib/lora_ruby.rb +2 -2
- 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: 625e87d729f6f0fe8cd122e0a87a4d2908445f9d5e4880177e2113e980d7a790
|
|
4
|
+
data.tar.gz: a3f3a29409f5d880a1f28a4e495a19414e2eb863bef9f59969485e4f249b6c16
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9041a08d3fec37fd16976e1ff2baa5f11e46cae0f3a2548656538ef845641be5c6cfdc0a8c1f4f806ec3974e4085d881e71ebf2cc901719c92dfb60e6b947f76
|
|
7
|
+
data.tar.gz: f2d582b1624f6293ecb8a72b175c80d1e9243b6f2f8866c313eb12675b5777e4e19596b98795ff51c0455147246598a56e10a27ba87f60b754e47b9e23990a88
|
data/README.md
CHANGED
|
@@ -76,8 +76,9 @@ binding's `lora_python.Database` and because it mirrors the
|
|
|
76
76
|
## Public API
|
|
77
77
|
|
|
78
78
|
```ruby
|
|
79
|
-
LoraRuby::Database.create(
|
|
80
|
-
LoraRuby::Database.new(
|
|
79
|
+
LoraRuby::Database.create(database_name = nil, options = nil) # -> Database
|
|
80
|
+
LoraRuby::Database.new(database_name = nil, options = nil) # -> Database
|
|
81
|
+
LoraRuby::Database.open_wal(wal_dir, options = nil) # -> Database
|
|
81
82
|
|
|
82
83
|
db.execute(query, params = nil) # -> { "columns" => [...], "rows" => [...] }
|
|
83
84
|
db.clear # -> nil
|
|
@@ -156,9 +157,19 @@ replays committed writes before returning the handle.
|
|
|
156
157
|
Call `db.close` before reopening the same archive inside one
|
|
157
158
|
process.
|
|
158
159
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
For explicit WAL directories with managed snapshots, use `open_wal`:
|
|
161
|
+
|
|
162
|
+
```ruby
|
|
163
|
+
db = LoraRuby::Database.open_wal(
|
|
164
|
+
"./data/wal",
|
|
165
|
+
snapshot_dir: "./data/snapshots",
|
|
166
|
+
snapshot_every_commits: 1000,
|
|
167
|
+
snapshot_keep_old: 2,
|
|
168
|
+
)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
`snapshot_options` accepts the same compression/encryption options as
|
|
172
|
+
`save_snapshot`.
|
|
162
173
|
|
|
163
174
|
## Concurrency (GVL release)
|
|
164
175
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/lora_ruby/types.rb
CHANGED
|
@@ -7,7 +7,7 @@ module LoraRuby
|
|
|
7
7
|
# - Scalars pass through as Ruby natives (`nil`, `true`, `false`,
|
|
8
8
|
# `Integer`, `Float`, `String`).
|
|
9
9
|
# - Lists and maps come back as `Array` / `Hash` (string keys).
|
|
10
|
-
# - Graph, temporal, and
|
|
10
|
+
# - Graph, temporal, spatial, vector, and binary values come back as plain `Hash`es
|
|
11
11
|
# with a `"kind"` discriminator.
|
|
12
12
|
#
|
|
13
13
|
# If you want to narrow a value explicitly, use the `node?` / `point?`
|
|
@@ -56,6 +56,21 @@ module LoraRuby
|
|
|
56
56
|
}
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
+
# ------------------------------------------------------------------
|
|
60
|
+
# Binary / blob constructor — segmented bytes. The native extension
|
|
61
|
+
# accepts each segment as a Ruby String and preserves segment
|
|
62
|
+
# boundaries in WAL/snapshot storage.
|
|
63
|
+
# ------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
def binary(segments)
|
|
66
|
+
copied = segments.map { |segment| segment.b.dup }
|
|
67
|
+
{
|
|
68
|
+
"kind" => "binary",
|
|
69
|
+
"length" => copied.sum(&:bytesize),
|
|
70
|
+
"segments" => copied,
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
59
74
|
# ------------------------------------------------------------------
|
|
60
75
|
# Spatial constructors — mirrors lora_python.cartesian / wgs84.
|
|
61
76
|
# `cartesian(1, 2)` returns a 2D cartesian point; use `cartesian_3d`
|
|
@@ -122,6 +137,7 @@ module LoraRuby
|
|
|
122
137
|
def path?(v) = tagged?(v, "path")
|
|
123
138
|
def point?(v) = tagged?(v, "point")
|
|
124
139
|
def vector?(v) = tagged?(v, "vector")
|
|
140
|
+
def binary?(v) = tagged?(v, "binary")
|
|
125
141
|
|
|
126
142
|
def temporal?(v)
|
|
127
143
|
return false unless v.is_a?(Hash)
|
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.6.0" unless const_defined?(:VERSION)
|
|
14
14
|
end
|
data/lib/lora_ruby.rb
CHANGED
|
@@ -32,8 +32,8 @@ module LoraRuby
|
|
|
32
32
|
%i[
|
|
33
33
|
date time localtime datetime localdatetime duration
|
|
34
34
|
cartesian cartesian_3d wgs84 wgs84_3d
|
|
35
|
-
vector
|
|
36
|
-
node? relationship? path? point? temporal? vector?
|
|
35
|
+
vector binary
|
|
36
|
+
node? relationship? path? point? temporal? vector? binary?
|
|
37
37
|
].each do |m|
|
|
38
38
|
define_singleton_method(m) do |*args, **kwargs|
|
|
39
39
|
if kwargs.empty?
|
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.6.0
|
|
5
5
|
platform: aarch64-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-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|