Can't combine `OR` and `AND` query
- Dominant language
- TypeScript
- Stars
- 46
- Forks
- 6
- PR merge metrics
- No merged PRs in 30d
Description
https://magnetar.cycraft.co/docs-main/read-data/#query
The following syntax is not working properly:
```ts
magnetar
.collection('pokedex')
.query({
or: [
{ and: [['type', '==', 'fire'], ['level', '>', 16]] },
{ and: [['type', '==', 'water'], ['level', '<', 16]] }
]
})
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the query syntax described in the linked read-data documentation and reproduce the TypeScript example using magnetar.collection('pokedex').query(). Trace how the nested or and and conditions are processed, then add coverage for both branches and confirm the combined query returns the expected fire and water records.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100