Skip to main content

WriteBatchIteratorCf

Trait WriteBatchIteratorCf 

Source
pub trait WriteBatchIteratorCf {
    // Required methods
    fn put_cf(&mut self, cf_id: u32, key: &[u8], value: &[u8]);
    fn delete_cf(&mut self, cf_id: u32, key: &[u8]);
    fn merge_cf(&mut self, cf_id: u32, key: &[u8], value: &[u8]);

    // Provided method
    fn log_data(&mut self, _blob: &[u8]) { ... }
}
Expand description

Receives the puts, deletes, and merges of a write batch with column family information.

This trait extends write batch iteration to support column family-specific operations. The application must implement this trait when iterating operations within a WriteBatch that contains column family-aware writes.

Note that for the default column family “default”, the column family ID is 0.

Required Methods§

Source

fn put_cf(&mut self, cf_id: u32, key: &[u8], value: &[u8])

Called with a column family ID, key, and value that were put into the specific column family of the batch.

Source

fn delete_cf(&mut self, cf_id: u32, key: &[u8])

Called with a column family ID and key that were deleted from the specific column family of the batch.

Source

fn merge_cf(&mut self, cf_id: u32, key: &[u8], value: &[u8])

Called with a column family ID, key, and value that were merged into the specific column family of the batch. Merge operations combine the provided value with the existing value at the key using a database-defined merge operator.

Provided Methods§

Source

fn log_data(&mut self, _blob: &[u8])

Called with a blob that was appended by put_log_data.

Log data belongs to no column family, so there is no id here. It is interleaved with the other records in insertion order. The default implementation ignores it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§