A database abstraction layer
A database layer for web designers - use selectors to access multiple data sources.
An example using jQuarry on a simple JSON data file:
var jquarry = require'jquarry';// create a new suppliervar jsonSupplier = jquarryjsonpath:'/var/myJsonFile.json';// make a new quarry with a supplier mapvar $ = jquarryname:'My First Quarry'// provide the supplier map for the selectorssuppliers:default:jsonSupplier;// load some elements as a flat list (like jQuery)$'product.onsale[price<100]'eachconsole.log'Found product less than 100: ' + $thisattr'name';;// load some elements as a tree (with all subchildren)$'product.onsale[price<100]'eachconsole.log'Found product with: ' + $thisfind'image'length + ' images';;
$ npm install jquarry
- Access multiple databases using the jQuery code you are used to
Web designers understand CSS - they don't understand databases however.
jQuarry is the bridge between the land of databases and the land of CSS selector jQuery client side programming.
To run the test suite first invoke the following command within the repo, installing the development dependencies:
$ npm install
then run the tests:
$ make test
(The MIT License)
Copyright (c) 2006-2012 jQuarry <firstname.lastname@example.org>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.