Skip to content

Range query of composite keysΒ #154

@bestbeforetoday

Description

@bestbeforetoday

Initially raised by @aklenik on Discord.

As I see, the functionality of the range query is limited across all chaincode SDKs to simple keys. However, behind the scenes, the range query methods of the SDKs call the same backing function as the partial query functions, which don't have the same limitations. That means that the reason for the limitation is not technical, since a range CAN be queried using composite keys.

I can't really wrap my head around the why. Using composite keys is the recommended approach for defining structured and robust key spaces. While range query is a strong update-compatible API feature for efficiently traversing well-designed key spaces. The combination of the two is so evident that I was really surprised to see it fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions