Nuummite
Inherits Locking < Reference < Object
Nuummite is a minimalistic persistent key-value store.
Constants
VERSION = 1
Constructors
new(folder : String, filename : String = "db.nuummite", sync : Bool = true)
SourceInstance methods
auto_garbage_collect_after_writes
Number of writes or deletes before automatic garbage collection happens.
Set it to nil to disable automatic garbage collection.
auto_garbage_collect_after_writes=(auto_garbage_collect_after_writes : Int32 | Nil)
Number of writes or deletes before automatic garbage collection happens.
Set it to nil to disable automatic garbage collection.
each(starts_with : String = "", &)
Yields every key-value pair where the key starts with starts_with.
db["crystals/ruby"] = "9.0"
db["crystals/quartz"] = "~ 7.0"
db["crystals/nuummite"] = "5.5 - 6.0"
db.each("crystals/") do |key, value|
# only crystals in here
end
starts_with defaults to "". Then every key-value pair is yield.