Tiny package to retrieve recursively data from Parse.com. Created for data migrations.
Works only in io.js +1.6 and node.js +0.12 passing the following flags: --harmony --harmony_arrow_functions
npm install parse-mitigrator
const mitigrator = require('parse-mitigrator')
const client = mitigrator({
appId: 'blablabla',
appKey: 's3cr3t'
})
let query = client.createQuery('User')
query.exists('email')
let fetcher = client.fetch(query, next)
function next(err, results) {
if (err) {
return console.error('Error:', err)
}
if (this.hasMore()) {
return this.next(next)
}
console.log('All fetched!')
}
Return: Parse.Query
Return: Fetch
Perform the query to parse, passing the results or error to the callback with the following notation:
callback(err, results)
Return: boolean
Check if the current query has more results
Fetch the next bunch of results based on the current index
MIT - Socialtram Ltd and contributors