Is your feature request related to a problem? Please describe.
the current implementation uses callbacks extensively for database operations.
this makes the code non-linear and difficult to improve/debug.
code becomes redundant as each layer of callback requires its own handling of errors.
often referred to as callback-hell 🔥
Describe the solution you'd like
Since the database driver supports promises, we can either use the promise syntax or the async-await flow as an alternative. This will keep the codebase linear flow.
This will also allow us to document the codebase better as it is practically easier to document small functions than nested arrangements of them.
Describe alternatives you've considered
we can use third-party libraries like async.js but I personally not support adding libraries for functionality that can be easily done by built-in functions.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
This will also allow us to document the codebase better as it is practically easier to document small functions than nested arrangements of them.
Describe alternatives you've considered
Additional context