redb icon indicating copy to clipboard operation
redb copied to clipboard

Please clarify if `Table.insert()` does replace the attribute if it exists

Open abique opened this issue 1 year ago • 2 comments

Hi,

From reading the doc, it is unclear if Table.instert() does replace or not existing entries.

Thanks, Alex

abique avatar Mar 31 '24 19:03 abique

It does. All the APIs are designed to be similar in function to std::collections::BtreeMap

On Sun, Mar 31, 2024 at 12:16 PM Alexandre Bique @.***> wrote:

Hi,

From reading the doc, it is unclear if Table.instert() https://docs.rs/redb/latest/redb/struct.Table.html#method.insert does replace or not existing entries.

Thanks, Alex

— Reply to this email directly, view it on GitHub https://github.com/cberner/redb/issues/787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGNXQFX6ZXGNGFIXBLW5TLY3BOI5AVCNFSM6AAAAABFQURVTOVHI2DSMVQWIX3LMV43ASLTON2WKOZSGIYTOMJUHA2TEMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

cberner avatar Mar 31 '24 19:03 cberner

OK, thanks for the clarification :+1: . https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.insert seems to explicitly describe the update scenario.

abique avatar Mar 31 '24 20:03 abique