Skip to content

Commit

Permalink
version
Browse files Browse the repository at this point in the history
  • Loading branch information
shahrul committed Jul 3, 2024
1 parent 66e3c8d commit b3d0303
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,39 @@ await rq({
// }
// }
```
You can also return as dataUrl
```js
await rq({
PlayerClass: {
player: {
$params: { gameId: 0 },
name: 1,
inventory: {
id: 1,
name: 1,
count: 1
}
}
}
}, { ...extConfig, dataUrl: 'PlayerClass/player/inventory' }).then(console.log)
// [
// {
// id: '0',
// name: 'Healing Potion',
// count: 7
// },
// {
// id: '1',
// name: 'Bandage',
// count: 1
// },
// {
// id: '2',
// name: 'Holy Water',
// count: 0
// }
// ]
```

## More Samples
You can check [samples](https://github.com/syarul/requrse/blob/main/samples) folder to see more usage cases with [Mongoose](https://github.com/syarul/requrse/blob/main/samples/mongoose), [Redis](https://github.com/syarul/requrse/blob/main/samples/redis) and the [Starwars](https://github.com/syarul/requrse/blob/main/samples/starwars) examples.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@syarul/requrse",
"version": "0.2.8",
"version": "0.2.9",
"type": "module",
"description": "Lightweight driven query language",
"main": "libs/executor.cjs",
Expand Down

0 comments on commit b3d0303

Please sign in to comment.