Open polina-collab opened 1 month ago
Hi! Thanks for a great lib! Is it possible to use .q method with callback instead of promise? And can we use createPool and then call .q method?
Hi @polina-collab,
Thanks for your kind words! I'm glad you find the library helpful.
The .q method in mysql2-cache is designed to work with promises, but you can still use it in a callback-style pattern by converting the promise into a callback manually by using Node.js's util.callbackify() utility to convert the promise-based function into a callback-based one.
Yes you may, but .connect method already utilizes pooling, so you don't need to. But thanks for pointing it out that it's not mentioned in readme.
Hope that helps
Hi! Thanks for a great lib! Is it possible to use .q method with callback instead of promise? And can we use createPool and then call .q method?