class Nuummite
- Nuummite
- Reference
- Object
Overview
Nuummite is a minimalistic persistent key-value store.
Included Modules
Defined in:
nuummite.crConstant Summary
-
VERSION =
1
Constructors
Instance Method Summary
-
#[](key)
Reads value to given key.
-
#[]=(key, value)
Set key to value.
-
#[]?(key)
Reads value to given key.
-
#auto_garbage_collect_after_writes : Int32 | Nil
Number of writes or deletes before automatic garbage collection happens.
-
#auto_garbage_collect_after_writes=(auto_garbage_collect_after_writes : Int32 | Nil)
Number of writes or deletes before automatic garbage collection happens.
-
#delete(key)
Delets a key.
-
#each(starts_with : String = "", &)
Yields every key-value pair where the key starts with
starts_with
. -
#garbage_collect
Rewrites current state to logfile.
-
#shutdown
Shuts down this instance of Nuummite.
-
#sync : Bool
If true the logfile is flushed on every write.
-
#sync=(sync : Bool)
If true the logfile is flushed on every write.
Constructor Detail
Instance Method Detail
Number of writes or deletes before automatic garbage collection happens.
Set it to nil to disable automatic garbage collection.
Number of writes or deletes before automatic garbage collection happens.
Set it to nil to disable automatic garbage collection.
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.