My use case demands me to call an sql recursively till no rows are returned for which I have written the below code which due to async nature doesn\'t work as expected.