types / mysql2

Typings for https://github.com/sidorares/node-mysql2
ISC License
41 stars 23 forks source link

Add .promise() function on pools and connections #31

Closed trevorr closed 4 years ago

trevorr commented 4 years ago

This allows existing callback-based instances to be wrapped with promise-based interfaces. While most users can simply import mysql2/promise to use only promises, using both interfaces side by side is necessary to access advanced features like streaming query results.

See https://github.com/sidorares/node-mysql2#using-promise-wrapper

Fixes #28

unional commented 4 years ago

thanks!