JSPM

database-js-mssql-sravniru

0.3.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q22782F
  • License MIT

Database-js driver for SQL Server that works on Linux, Mac, and Windows

Package Exports

  • database-js-mssql-sravniru

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (database-js-mssql-sravniru) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

database-js-mssql

Database-js driver for SQL Server that works on Linux, Mac, and Windows

This database-js driver is a wrapper for node-mssql and works with MS SQL Server 2000-2017.

Install

npm install --save database-js-mssql

Example

var Connection = require('database-js').Connection;

(async function() {
    let conn, statement, results;
    try {
        conn = new Connection('mssql:///username:password@localhost/database');
        statement = conn.prepareStatement("SELECT * FROM states WHERE state = ?");
        results = await statement.query("South Dakota");
        console.log(results);
    } catch (reason) {
        console.log(reason);
    } finally {
        if (conn) {
            await conn.close();
        }
    }
})();

License

MIT © Thiago Delgado Pinto