Fix key may exist description (#521)

master
Stanislav Tkach 4 years ago committed by GitHub
parent 4438df4ced
commit b6c1d54c98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      src/db.rs

@ -849,13 +849,13 @@ impl<T: ThreadMode> DBWithThreadMode<T> {
}
/// Returns `false` if the given key definitely doesn't exist in the database, otherwise returns
/// `false`. This function uses default `ReadOptions`.
/// `true`. This function uses default `ReadOptions`.
pub fn key_may_exist<K: AsRef<[u8]>>(&self, key: K) -> bool {
self.key_may_exist_opt(key, &ReadOptions::default())
}
/// Returns `false` if the given key definitely doesn't exist in the database, otherwise returns
/// `false`.
/// `true`.
pub fn key_may_exist_opt<K: AsRef<[u8]>>(&self, key: K, readopts: &ReadOptions) -> bool {
let key = key.as_ref();
unsafe {
@ -874,13 +874,13 @@ impl<T: ThreadMode> DBWithThreadMode<T> {
}
/// Returns `false` if the given key definitely doesn't exist in the specified column family,
/// otherwise returns `false`. This function uses default `ReadOptions`.
/// otherwise returns `true`. This function uses default `ReadOptions`.
pub fn key_may_exist_cf<K: AsRef<[u8]>>(&self, cf: impl AsColumnFamilyRef, key: K) -> bool {
self.key_may_exist_cf_opt(cf, key, &ReadOptions::default())
}
/// Returns `false` if the given key definitely doesn't exist in the specified column family,
/// otherwise returns `false`.
/// otherwise returns `true`.
pub fn key_may_exist_cf_opt<K: AsRef<[u8]>>(
&self,
cf: impl AsColumnFamilyRef,

Loading…
Cancel
Save