Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for querying records of multiple data formats #429

Open
angiejones opened this issue Jul 8, 2023 · 0 comments
Open

Allow for querying records of multiple data formats #429

angiejones opened this issue Jul 8, 2023 · 0 comments
Labels
feature New feature or request

Comments

@angiejones
Copy link
Contributor

records.query() currently looks for the exact dataFormat string that's passed in. would love to support a case where an app wants to query for multiple data formats of the same main type, for example, images.

web5.dwn.records.query({
    message: {
      filter: {
        dataFormat: 'image/*',
      }
    }
});

@mistermoe suggests for MessageStoreLevel, on ingest we would split on / and index dataType and dataSubType as separate fields and to support querying it'd be something like:

  • if filter contains dataFormat:
    • const [type, subType] = dataFormat.split('/');
      • if subType === '*' , don't include subType in query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants