Skip to content

Commit

Permalink
clarify that Database::put_* methods overwrite the previous
Browse files Browse the repository at this point in the history
value
  • Loading branch information
nolanderc authored and Kerollmops committed Apr 29, 2024
1 parent 0eeb9a7 commit 26eff55
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions heed/src/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1787,7 +1787,8 @@ impl<KC, DC, C> Database<KC, DC, C> {
RwCursor::new(txn, self.dbi).map(|cursor| RwRevPrefix::new(cursor, prefix_bytes))
}

/// Insert a key-value pair in this database. The entry is written with no specific flag.
/// Insert a key-value pair in this database, replacing any previous value. The entry is
/// written with no specific flag.
///
/// ```
/// # use std::fs;
Expand Down Expand Up @@ -1842,7 +1843,8 @@ impl<KC, DC, C> Database<KC, DC, C> {
Ok(())
}

/// Insert a key-value pair where the value can directly be written to disk.
/// Insert a key-value pair where the value can directly be written to disk, replacing any
/// previous value.
///
/// ```
/// # use std::fs;
Expand Down Expand Up @@ -1908,7 +1910,8 @@ impl<KC, DC, C> Database<KC, DC, C> {
}
}

/// Insert a key-value pair in this database. The entry is written with the specified flags.
/// Insert a key-value pair in this database, replacing any previous value. The entry is
/// written with the specified flags.
///
/// ```
/// # use std::fs;
Expand Down

0 comments on commit 26eff55

Please sign in to comment.