Answer the question
In order to leave comments, you need to log in
How to properly organize search in NoSql (Parse) database?
With the Parse API, fetching from a database is done like this:
getSearchResults: function(callback) {
var query = new Parse.Query('ClassName');
query.descending("createdAt"); // порядок
query.lessThanOrEqualTo(key, value); // фильтр #1
query.contains(key, substring); // фильтр #2 и т.д. до 15 фильтров.
query.find({
success: function(items) {
callback(items);
},
error: function(obj, err) {
console.error('getAllNewEstate() error', obj, err);
}
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question