Skip to content

Refactor the Datastore API to be generic #11

Open
@michaelsbradleyjr

Description

@michaelsbradleyjr

This will allow more flexibility re: key and data parameters.

Because Nim's method facility doesn't support generics and because multi-methods are deprecated, we'll need to choose from one of several options:

  • vtable approach as seen in e.g. nim-faststreams
  • The approach taken in nim-eth's kvstore.nim
  • Defining the core API in datastore/datastore.nim such that it is intended to be consumed by implementors of Datastore via include instead of import.

Note: the last option is currently considered the least desirable per previous team discussion, but I've included it in the list of possible approaches because it can work even if there are reasons to avoid it.

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