Struct rocksdb::SstFileWriter
source · pub struct SstFileWriter<'a> { /* private fields */ }
Expand description
SstFileWriter is used to create sst files that can be added to database later All keys in files generated by SstFileWriter will have sequence number = 0.
Implementations§
source§impl<'a> SstFileWriter<'a>
impl<'a> SstFileWriter<'a>
sourcepub fn open<P: AsRef<Path>>(&'a self, path: P) -> Result<(), Error>
pub fn open<P: AsRef<Path>>(&'a self, path: P) -> Result<(), Error>
Prepare SstFileWriter to write into file located at “file_path”.
sourcepub fn put<K, V>(&mut self, key: K, value: V) -> Result<(), Error>where
K: AsRef<[u8]>,
V: AsRef<[u8]>,
pub fn put<K, V>(&mut self, key: K, value: V) -> Result<(), Error>where
K: AsRef<[u8]>,
V: AsRef<[u8]>,
Adds a Put key with value to currently opened file REQUIRES: key is after any previously added key according to comparator.