GO Query!
[] (https://travis-ci.org/rubenspgcavalcante/GO-Query)
[] (https://badge.fury.io/hooks/github)
##About
GO Query! is a javascript library to execute queries into array of objects. You can perorm a SELECT, UPDATE or
REMOVE into your array based on the objects and filters.
##Download
Latest development version:
source file
Latest production version 1.0.2:
minified
###Why use it?
Sometimes, you just want to search into a array of objects in a simple way, but with more complex filters,
avoiding to do a request to the server and wait for server response time and network transfer time.
###Where can I use it?
Well, you can use in client-side, but you can use it in server side too (nodejs, commonjs).
###Dependeces?
Nope!
###How can I use?
Well, let's suppose we have a array of 'users' and need to find
all who are older than 20 years or have the first name John and
works on company ACME
var query = new GO.Query(objArray);
query = query.select("*")
.from(Object)
.where(
new GO.Filter("age", GO.op.GTE, 21)
.or("name", GO.op.LIKE, /^John/)
.and("company.name", GO.op.EQ, "ACME")
);
var result = query.run();
###Using with Node.js?
first intall via npm
npm install goquery
... and import the module
//import
var GO = require("goquery");
//use
var q = new GO.Query(data);
//...
###More details?
See the API
#Building
If you want to build the sources, you will need first install all dependences and after intall the grunt client
globally:
npm install
sudo install -g grunt-cli
To run the tasks:
grunt
##Author
Rubens Pinheiro Gonçalves Cavalcante
email: rubenspgcavalcante@gmail.com
##License & Rights
Using GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
gnu.org