rox v2.3.0 Rox.Batch
Module for performing atomic write operations on a database.
Link to this section Summary
Functions
Schedules a delete operation in the batch.
Schedules a delete operation in the batch for key in column_family.
Merges a list of Batch.t into a single Batch.t.
Creates a new Batch operation
Returns a new Batch with a put operation scheduled.
Returns a new Batch with a put operation scheduled for the column_family.
Atomically commits the operations in the batch to the db.
Link to this section Types
t()
t() :: %Rox.Batch{operations: [op()]}
t() :: %Rox.Batch{operations: [op()]}
A reference to a batch operation
Link to this section Functions
delete(batch, key)
Schedules a delete operation in the batch.
delete(batch, column_family, key)
delete(t(), Rox.ColumnFamily.t(), Rox.key()) :: t()
delete(t(), Rox.ColumnFamily.t(), Rox.key()) :: t()
Schedules a delete operation in the batch for key in column_family.
merge(batches)
Merges a list of Batch.t into a single Batch.t.
new()
new() :: t()
new() :: t()
Creates a new Batch operation
put(batch, key, value)
Returns a new Batch with a put operation scheduled.
put(batch, column_family, key, value)
put(t(), Rox.ColumnFamily.t(), Rox.key(), Rox.value()) :: t()
put(t(), Rox.ColumnFamily.t(), Rox.key(), Rox.value()) :: t()
Returns a new Batch with a put operation scheduled for the column_family.
write(batch, db)
Atomically commits the operations in the batch to the db.