Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wcandillon/jsoniq-mongodb-examples
JSONiq Query Examples for MongoDB
https://github.com/wcandillon/jsoniq-mongodb-examples
Last synced: about 1 month ago
JSON representation
JSONiq Query Examples for MongoDB
- Host: GitHub
- URL: https://github.com/wcandillon/jsoniq-mongodb-examples
- Owner: wcandillon
- License: apache-2.0
- Created: 2015-03-25T18:07:36.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-13T17:56:27.000Z (over 9 years ago)
- Last Synced: 2024-10-14T05:27:24.808Z (2 months ago)
- Language: JSONiq
- Size: 150 KB
- Stars: 3
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#JSONiq Query Examples for MongoDB
##Configure & Run
In order to run these examples, you need to create an account on http://28.io.
You also need to install the 28 CLI tool:
```bash
$npm install 28 -g
$28 login [email protected]
```You can then edit the mongodb-config.json file with the credential of your own MongoDB.
To create a project and attach your MongoDB:
```bash
$28 projects create my-project
$28 datasources set my-project -c mongodb-config.json
```To upload the queries:
```bash
$cd queries/
$28 upload my-project
```To run a query:
```bash
$cd queries/
$28 run my-project public/top_contributors.jq
```## JSONiq Development
The Atom and Cloud9 editors have great support for JSONiq.
The Atom extension for JSONiq is available [here](https://atom.io/packages/language-jsoniq).The `28 watch` command will deploy your queries to 28.io everytime they are updated locally.
```bash
$cd queries/
$28 watch my-project
```For continuous integration, there is a gulp task to perform static code analysis on your queries: [gulp-xqlint](https://github.com/wcandillon/gulp-xqlint). And example of integration between 28.io and gulp is available [here](https://github.com/28msec/cellstore/blob/master/tasks/28.js).