OdoQL
OdoQL is an extendible, composable and modular JSON query language.
This module (odoql) can build JSON queries with no additional dependencies. Use odoql-exe and other providers to execute queries. Or build additional execution environments in languages other than javascript.
- OdoQL Examples contain some good examples of the OdoQL syntax.
- Odo.js Handbook is a good example of how OdoQL can be used in a web framework.
Usage
Define a query
var ql = ;ql = ql ; var query = shape street: true ; console;
Raw JSON format can be sent to a server or saved.
{
"__q": "shape",
"__p": {
"street": true
},
"__s": {
"__q": "filter",
"__p": {
"__q": "gt",
"__l": {
"__q": "ref",
"__s": "sq__ft"
},
"__r": 1000
},
"__s": {
"__q": "assign",
"__p": {
"sq__ft": {
"__q": "asFloat",
"__s": {
"__q": "ref",
"__s": "sq__ft"
}
}
},
"__s": {
"__q": "csv",
"__p": {
"header": true,
"skipEmptyLines": true
},
"__s": {
"__q": "http",
"__s": "http://samplecsvs.s3.amazonaws.com/Sacramentorealestatetransactions.csv"
}
}
}
}
}
Execute a JSON query:
var exe = ;exe = ; var run = exe; ;
This is just the start, see OdoQL Exe source for other components including caching, dynamic queries and parrallel queries. See Odo Relay to integrate OdoQL into Odo.js