parse-query-gen
v1.1.6
Published
Helps you generate queries for your Parse Backend, structuring them with objects
Downloads
16
Maintainers
Readme
Parse Query Generator
This software is meant to be used with parse-server
. It lets you write
an object and get an equivalent Parse.Query
in Javascript.
Examples
// es6+
import { ParseQueryGen } from 'parse-query-gen';
// es5
const ParseQueryGen = require('parse-query-gen').ParseQueryGen;
// use
const query = ParseQueryGen.gen({
className: 'MyClass',
equalTo: {
active: true,
awesome: 'absolutely',
}
});
// now your code...
query.find().then(...)
Supported keys
interface IParams {
className?: string;
equalTo?: {[key:string]: any}; // example: { great: true }
containedIn?: {[key:string]: any};
notEqualTo?: {[key:string]: any};
lessThan?: {[key:string]: any};
greaterThan?: {[key:string]: any};
containsAll?: {[key:string]: any};
include?: string[];
descending?: string[];
ascending?: string[];
query?: any;
matches?: {[key:string]: any;};
select?: string[];
}
Credits
Developed by Juan Camilo Guarín Peñaranda,
Otherwise SAS, Colombia
2017
License
MIT.