decentralized-identity / decentralized-identity/dwn-sdk-js
Allow for querying records of multiple data formats
- Dominant language
- TypeScript
- Stars
- 322
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
`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.
```js
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
Contributor guide
Assessment
This issue has not been assessed yet.