Skip to content

Instantly share code, notes, and snippets.

View markmssd's full-sized avatar
🔥

Mark Massoud markmssd

🔥
View GitHub Profile
@markmssd
markmssd / getObjects.js
Created March 19, 2017 01:27 — forked from Calvein/getObjects.js
Get all objects from a parse class
// Returned promise
var promise = new Parse.Promise()
// Error function
var error = function() {
console.error('Error:', arguments)
// Break it
response.error('Query failed, check logs')
}
@markmssd
markmssd / main.js
Created March 19, 2017 01:27 — forked from clemblanco/main.js
Parse - CloudCode - Retrieve all objects from a specific Parse class without limitation
Parse.Cloud.define("retrieveAllObjects", function(request, status) {
var result = [];
var chunk_size = 1000;
var processCallback = function(res) {
result = result.concat(res);
if (res.length === chunk_size) {
process(res[res.length-1].id);
} else {
status.success(result);
}