Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promise Support? #199

Open
NoahCardoza opened this issue Jun 9, 2018 · 2 comments
Open

Promise Support? #199

NoahCardoza opened this issue Jun 9, 2018 · 2 comments

Comments

@NoahCardoza
Copy link

As the title states: is there a plan for this library support promises anytime in the near future?

I'd be happy to submit a PR if this is something that you are interested in.

Thanks.

@knoxcard
Copy link

knoxcard commented Sep 8, 2018

Why not just make this a mariadb driver for Sequelize (https://www.npmjs.com/package/sequelize)? They have all the promise support you need, it's a wonderful ORM and super secure after years and years of code updates.

@teemujonkkari
Copy link

It's easy to use promisify for this

const util = require('util')
    
const asyncQuery = util.promisify(c.query);
        
const rows = await asyncQuery.call(c, 'SELECT product FROM products WHERE id = :id', { id }, { useArray: false, metaData: false })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants