bmg 0.21.4 → 0.21.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -12
  3. data/lib/bmg/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 59da4b61f1d6c332de148552eab6277032df750c
4
- data.tar.gz: b65877260b6a5eca59fb864f52a08dad26f917f4
3
+ metadata.gz: 91f0681124b487847c3af44ea65635ebb02df727
4
+ data.tar.gz: e7613c53a87c753c3a8a8dfb5876de592219b0c3
5
5
  SHA512:
6
- metadata.gz: fd85e6e179eb6e1a4d9ffe2f074db3c0d856d239bc65b8d535d6d14cff987a0af1eed75046aed0538726ff87925b9a2a400153a1acec7d7ecc3cc7fdc50d0e87
7
- data.tar.gz: 5954aad879e293d34eb175ff54055473e3a983e6a16ec816694eb0b16fd90897cbf9d31bcdf53bfdef664891abb42cb538c7962954d76331c291411e816c956b
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
- elements in the same database (e.g. tuples from other relvars).
206
- The serializer is either `:marshal` or `:json`. Please note that
207
- types are not preserved when using the second one (all attribute
208
- values will come back as strings, but keys will be symbolized).
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, ...]) # natural join on a join key
256
- r.join(right, :a => :x, :b => :y, ...) # natural join after right reversed renaming
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
- t.transform(:to_s) # all-attrs transformation
272
- t.transform(&:to_s) # similar, but Proc-driven
273
- t.transform(:foo => :upcase, ...) # specific-attrs tranformation
274
- t.transform([:to_s, :upcase]) # chain-transformation
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
@@ -2,7 +2,7 @@ module Bmg
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 21
5
- TINY = 4
5
+ TINY = 5
6
6
  end
7
7
  VERSION = "#{Version::MAJOR}.#{Version::MINOR}.#{Version::TINY}"
8
8
  end
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
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-03-08 00:00:00.000000000 Z
11
+ date: 2024-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: predicate