Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
stop6106285dit doesnt have the ability for batchprocessing?
SortOfTested24830285dWrite a generator to produce paged series of your record for batching to sql:
Js doesn't support tail recursion, so you'll either need to flatten the recursion that way, or use the trampoline pattern.
Take care of edge cases though, we wouldn't want it to have a fucked up exit condition.
eval730285dFuck callbacks. Use mysql2/promise and use async await... That's like the best of both worlds (async but readable like sequential and no callback hell)
I'd never want to use JS without async await anymore. Just make sure to try catch where appropriate.
kwilliams6515285dA resursive callback function like that might cause a stack overflow if the number of recursions are too high.