Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-mysql

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-mysql

async-mysql is a wrapper for mysql that uses ES7 async functions.

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
172
decreased by-1.71%
Maintainers
1
Weekly downloads
 
Created
Source

async-mysql

NPM version Travis build status Dependency Status

async-mysql is a wrapper for mysql that uses ES7 async functions.

Usage

let main;

// async/await can be used only within an async function.
main = async () => {
    let mysql = require('async-mysql'),
        connection,
        rows;

    connection = await mysql.connect({
        host: 'localhost'
    });

    rows = await connection.query('SELECT 1');
    // [{'1': 1}]

    try {
        await connection.query('INVALID_QUERY');
    } catch (e) {
        e;
        // [Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INVALID_QUERY' at line 1]
    }
};

main();

Keywords

FAQs

Package last updated on 23 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc