Skip to content

Custom comparison function #776

@achille-roussel

Description

@achille-roussel

Hello,

Today the key comparison function used by the database is bytes.Compare. In cases where we're dealing with fixed-size integer or ascii keys this makes a lot of sense, but I have a use case for using variable size integers as keys (similar to big.Int), and the order of the keys as defined by bytes.Compare is not the natural order of the integer values.

I'd like to explore modifying the package to make the comparison function configurable at the database level, but I wanted to get feedback from someone more familiar with the implementation in case there were any major concerns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/apiIssues related to current API limitations.kind/enhancementSomething could be better.priority/P3Low priority, something to be done once everything else is fixed.skip/staleSkip stalebotstatus/acceptedWe accept to investigate or work on it.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions