Skip to content

Value update options for BulkInsert and AddRange #9

Open
@VJalili

Description

@VJalili

First of all, I would like to thank you (again) for sharing such an excellent work with us.

I usually use AddOrUpdate method to add a new item to the bplustree. The possibility of passing a struct of AddUpdateValue that implements ICreateOrUpdateValue<C, B>, IRemoveValue<C, B> is a perfect option that extends and facilitates value update procedure. However, I wonder why such a magnificent feature is avoided in BulkInsert and AddRange.

Depending on application, value update by replacing old value with new one might be preferred, however, some applications could have custom update procedures. Some applications may require updating the value of a given key with new value where the new value it self depends on old one. For instance, lets suppose value is the average of all observed measures for a key; you observe new measure, now you would like to update the value, not replace it. AddOrUpdate perfectly addresses this requirement, but BulkInsert and AddRange are very limited in this regard.

I would like to know if you have any plans for incorporating AddUpdateValue feature in these super fast :) insertions ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions