Update db.rs

master
Valerian Saliou 6 years ago committed by GitHub
parent 2613d0688e
commit 09da01d457
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      src/db.rs

@ -1654,8 +1654,8 @@ impl WriteBatch {
/// Removes the database entries in the range ["begin_key", "end_key"), i.e.,
/// including "begin_key" and excluding "end_key". It is not an error if no
/// keys exist in the range ["begin_key", "end_key").
pub fn delete_range<K: AsRef<[u8]>>(&mut self, start_key: K, end_key: K) -> Result<(), Error> {
let (start_key, end_key) = (start_key.as_ref(), end_key.as_ref());
pub fn delete_range<K: AsRef<[u8]>>(&mut self, from: K, to: K) -> Result<(), Error> {
let (start_key, end_key) = (from.as_ref(), to.as_ref());
unsafe {
ffi::rocksdb_writebatch_delete_range(
@ -1672,10 +1672,10 @@ impl WriteBatch {
pub fn delete_range_cf<K: AsRef<[u8]>>(
&mut self,
cf: ColumnFamily,
start_key: K,
end_key: K,
from: K,
to: K,
) -> Result<(), Error> {
let (start_key, end_key) = (start_key.as_ref(), end_key.as_ref());
let (start_key, end_key) = (from.as_ref(), to.as_ref());
unsafe {
ffi::rocksdb_writebatch_delete_range_cf(

Loading…
Cancel
Save