2.0.3 • Published 8 years ago

tg-query v2.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

tg-query

Query Builder and Parser for the front and back end

Query Builder Usage:

import QueryBuilder from "tg-client-query-builder";

//make sure to instantiate the qb anew each time you want to use it
//If it isn't re-instantaited it will grow bigger and bigger!
let qb = new QueryBuilder("notificationRecipient"); //instantiate with the model name
const filter = qb.whereAll({
    userId: currentUser.userId, //make normal where statements like this
    notificationId: qb.related("notification.id").whereAll({ //specify the connection like this
        type: "info" //add more where statements
    })
}).toJSON() //remember to call toJSON
2.0.3

8 years ago

2.0.2

8 years ago

2.0.1

8 years ago