Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thiagodp/database-js-mssql
Database-js driver for SQL Server that works on Linux, Mac, and Windows
https://github.com/thiagodp/database-js-mssql
database database-js database-js-mssql driver ms-sql ms-sql-server mssql node query sql sql-server tds wrapper
Last synced: 2 months ago
JSON representation
Database-js driver for SQL Server that works on Linux, Mac, and Windows
- Host: GitHub
- URL: https://github.com/thiagodp/database-js-mssql
- Owner: thiagodp
- License: mit
- Created: 2018-06-23T22:11:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-19T18:57:27.000Z (about 5 years ago)
- Last Synced: 2024-10-12T07:41:13.936Z (3 months ago)
- Topics: database, database-js, database-js-mssql, driver, ms-sql, ms-sql-server, mssql, node, query, sql, sql-server, tds, wrapper
- Language: JavaScript
- Size: 19.5 KB
- Stars: 1
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# database-js-mssql
> Database-js driver for SQL Server that works on Linux, Mac, and Windows
This [database-js](https://github.com/mlaanderson/database-js) driver is a wrapper for [node-mssql](https://github.com/thiagodp/database-js-mssql.git) and works with MS SQL Server 2000-2017. _Pull Requests are welcome!_
## Install
```bash
npm install --save database-js-mssql
```## Example
```js
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](LICENSE) © [Thiago Delgado Pinto](https://github.com/thiagodp)