Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samlebarbare/querx
rethinkdb CLI for exporting data
https://github.com/samlebarbare/querx
cli rethinkdb
Last synced: about 2 months ago
JSON representation
rethinkdb CLI for exporting data
- Host: GitHub
- URL: https://github.com/samlebarbare/querx
- Owner: SamLebarbare
- Created: 2020-01-08T06:36:25.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-26T12:58:17.000Z (about 4 years ago)
- Last Synced: 2024-04-14T11:46:10.817Z (9 months ago)
- Topics: cli, rethinkdb
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Querx
Querx perform scripted rethinkdb queries and export results as
json or csv.## Usage
```bash
npx querx json ./players.js /tmp/output.json
``````js
//players.js
const q = r.db('game').table('players');
const cursor = yield q.run(con, next);
return yield cursor.toArray(next);
```## Script scope/context
| reference | |
| --------- | :--------------------------: |
| con | rethinkdb connection object |
| r | rethinkdb r query object |
| dir | function like console.dir |
| next | callback for async calls |## Limitations
- Your script must return an Array of results
- Use vanilla rethinkdb driver## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## License
[ISC](https://choosealicense.com/licenses/isc/)