Skip to content

feature: support async getters/settersΒ #397

Open
@nhomble

Description

Could electrodb be extended to support get/set hooks (prewrite and postread) to allow async functions?

Since the async part of it implies some more latency, I think it would be reasonable to only call these transformations once per write or read. Maybe to avoid confusion with existing get/set, we could just call these transformers or converters.

A common use case would be to transform certain fields in the schema as requiring a common encryption or hashing transformation prior to write. Conversely on the read, a similar transformation would be needed to decrypt the data.

The async part of it comes in when you have more complicated key retrieval strategies such that you need to retrieve the key per payload.

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