Class: LevelDb::Snapshot
Instance Method Summary collapse
- #close ⇒ Object
- #get(key) ⇒ Object
-
#initialize(db) ⇒ Snapshot
constructor
A new instance of Snapshot.
Methods included from Encoding
#decode_key, #decode_value, #encode_key, #encode_value
Constructor Details
Instance Method Details
#close ⇒ Object
303 304 305 |
# File 'lib/level_db.rb', line 303 def close @snapshot.close end |
#get(key) ⇒ Object
298 299 300 301 |
# File 'lib/level_db.rb', line 298 def get(key) value = @db.get(encode_key(key), @read_options) value && decode_value(value) end |