Skip to content
JSONiq Query Examples for MongoDB
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
queries/public
.gitignore
LICENSE
README.md
mongodb-config.json

README.md

#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:

$npm install 28 -g
$28 login your@email.com

You can then edit the mongodb-config.json file with the credential of your own MongoDB.

To create a project and attach your MongoDB:

$28 projects create my-project
$28 datasources set my-project -c mongodb-config.json

To upload the queries:

$cd queries/
$28 upload my-project

To run a query:

$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.

The 28 watch command will deploy your queries to 28.io everytime they are updated locally.

$cd queries/
$28 watch my-project

For continuous integration, there is a gulp task to perform static code analysis on your queries: gulp-xqlint. And example of integration between 28.io and gulp is available here.

You can’t perform that action at this time.