Class: SlateDb::WriteBatch
- Inherits:
-
Object
- Object
- SlateDb::WriteBatch
- Defined in:
- lib/slatedb/write_batch.rb
Instance Method Summary collapse
-
#delete(key) ⇒ self
Add a delete operation to the batch.
-
#put(key, value, ttl: nil) ⇒ self
Add a put operation to the batch.
Instance Method Details
#delete(key) ⇒ self
Add a delete operation to the batch.
33 34 35 36 |
# File 'lib/slatedb/write_batch.rb', line 33 def delete(key) _delete(key) self end |
#put(key, value, ttl: nil) ⇒ self
Add a put operation to the batch.
16 17 18 19 20 21 22 23 |
# File 'lib/slatedb/write_batch.rb', line 16 def put(key, value, ttl: nil) if ttl (key, value, { ttl: ttl }) else _put(key, value) end self end |