Answers for "back4app query unlimit"

0

back4app query unlimit

async function fetchAllIgnoringLimit(query,result) {
  const limit = 1000;
  query.limit(limit);
  query.skip(result.length);

  const results = await query.find();
  result = result.concat(results)

  if(results.length === limit) {
    return await fetchAllIgnoringLimit(query,result );
  } else {
    return result;
  }

}
Posted by: Guest on January-24-2022

Browse Popular Code Answers by Language