Skip to content

Use glob match for dictionary keys #58

Open
@mrzv

Description

@mrzv

Suppose I have a database with the following layout:

A/
  meta.json
  data.json
B/
  meta.json
  data.json
C/
  ...

Then suppose I try to read all the metadata via:

DDB.at('*/meta').read()

This will return the contents of only one of the meta.json, what I'd like is the dictionary of all of them indexed by 'A', 'B', 'C', .... In other words, I'd like the glob wildcard match to be used as keys, not the last component of the path.

Is it possible to add such functionality?

P.S. I realize that it's possible to reorganize the database into something like:

meta/
    A.json
    B.json
    C.json
data/
    A.json
    B.json
    C.json

But I think that's less flexible.

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