bmg 0.21.4 → 0.21.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -12
- data/lib/bmg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91f0681124b487847c3af44ea65635ebb02df727
|
4
|
+
data.tar.gz: e7613c53a87c753c3a8a8dfb5876de592219b0c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5948cf2f15c306b95cd289c01ea84602c250655a75de6bd884289efa4c1cb3535acbd811d77166750006f405a2d294a50135bc1eda92f390746aa0ae754c87d8
|
7
|
+
data.tar.gz: 9b82273935815d8808321d08dc292d3e4b3bb81a6eb97ef757715e4d7b0f6ff511d6ea648cb9851dee767cb29bb27559611a31494ad3fdcddbd8298fdcfa40e2
|
data/README.md
CHANGED
@@ -197,15 +197,17 @@ type = Bmg::Type::ANY.with_keys([[:id]])
|
|
197
197
|
r = Bmg.redis(type, {
|
198
198
|
key_prefix: "suppliers",
|
199
199
|
redis: Redis.new,
|
200
|
-
serializer: :marshal
|
200
|
+
serializer: :marshal,
|
201
|
+
ttl: 365 * 24 * 60 * 60
|
201
202
|
})
|
202
203
|
```
|
203
204
|
|
204
|
-
The key prefix will be used to distinguish the tuples from other
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
205
|
+
The key prefix will be used to distinguish the tuples from other elements in the
|
206
|
+
same database (e.g. tuples from other relvars). The serializer is either
|
207
|
+
`:marshal` or `:json`. Please note that types are not preserved when using the
|
208
|
+
second one (all attribute values will come back as strings, but keys will be
|
209
|
+
symbolized). The `ttl` is used to set the validity period of a tuple in redis
|
210
|
+
and is optional.
|
209
211
|
|
210
212
|
The redis relvars support basic algorithms for insert/update/delete.
|
211
213
|
No optimization is currently supported.
|
@@ -252,8 +254,8 @@ r.exclude(predicate) # shortcut for restrict(!predicate)
|
|
252
254
|
r.group([:a, :b, ...], :x) # relation-valued attribute from attributes
|
253
255
|
r.image(right, :x, [:a, :b, ...]) # relation-valued attribute from another relation
|
254
256
|
r.images({:x => r1, :y => r2}, [:a, ...]) # shortcut over image(r1, :x, ...).image(r2, :y, ...)
|
255
|
-
r.join(right, [:a, :b, ...]) #
|
256
|
-
r.join(right, :a => :x, :b => :y, ...) #
|
257
|
+
r.join(right, [:a, :b, ...]) # join on a join key
|
258
|
+
r.join(right, :a => :x, :b => :y, ...) # join after right reversed renaming
|
257
259
|
r.left_join(right, [:a, :b, ...], {...}) # left join with optional default right tuple
|
258
260
|
r.left_join(right, {:a => :x, ...}, {...}) # left join after right reversed renaming
|
259
261
|
r.matching(right, [:a, :b, ...]) # semi join, aka where exists
|
@@ -268,10 +270,10 @@ r.restrict(a: "foo", b: "bar", ...) # relational restriction, aka where
|
|
268
270
|
r.rxmatch([:a, :b, ...], /xxx/) # regex match kind of restriction
|
269
271
|
r.summarize([:a, :b, ...], x: :sum) # relational summarization
|
270
272
|
r.suffix(:_foo, but: [:a, ...]) # suffix kind of renaming
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
273
|
+
r.transform(:to_s) # all-attrs transformation
|
274
|
+
r.transform(&:to_s) # similar, but Proc-driven
|
275
|
+
r.transform(:foo => :upcase, ...) # specific-attrs tranformation
|
276
|
+
r.transform([:to_s, :upcase]) # chain-transformation
|
275
277
|
r.ungroup([:a, :b, ...]) # ungroup relation-valued attributes within parent tuple
|
276
278
|
r.ungroup(:a) # shortcut over ungroup([:a])
|
277
279
|
r.union(right) # relational union
|
data/lib/bmg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bmg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.21.
|
4
|
+
version: 0.21.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bernard Lambeau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: predicate
|