# co-mssql

> node-mssql wrappers for "co"

Latest version **1.3.0** (published 2016-02-21) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install co-mssql
pnpm add co-mssql
yarn add co-mssql
bun add co-mssql
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2016-02-21 |
| First published | 2014-01-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.11 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Patrik Simek |
| Maintainers | patriksimek |
| Keywords | database, mssql, sql, msnodesql, sqlserver, tds, node-tds, tedious, node-sqlserver, sqlserver, co, generators, yield |

## Links

- npm: https://www.npmjs.com/package/co-mssql
- Repository: https://github.com/patriksimek/co-mssql
- Homepage: https://github.com/patriksimek/co-mssql#readme
- Issues: https://github.com/patriksimek/co-mssql/issues
- npm.io page: https://npm.io/package/co-mssql

## Dependencies (1)

- [mssql](https://npm.io/package/mssql.md) ^3.1.1

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2016-02-21
- 1.2.1 — 2015-09-24
- 1.2.0 — 2015-02-19
- 1.1.0 — 2014-08-26
- 1.0.0 — 2014-07-04
- 0.1.3 — 2014-04-04
- 0.1.2 — 2014-04-01
- 0.1.1 — 2014-01-25
- 0.1.0 — 2014-01-23

## README

# co-mssql [![Dependency Status](https://david-dm.org/patriksimek/co-mssql.png)](https://david-dm.org/patriksimek/co-mssql) [![NPM version](https://badge.fury.io/js/co-mssql.png)](http://badge.fury.io/js/co-mssql)

[node-mssql](https://github.com/patriksimek/node-mssql) wrappers for [co](https://github.com/visionmedia/co)

There is only one difference from original module - all methods that accepts callback as last argument are thunkified and compatible with [co](https://github.com/visionmedia/co). This module doesn't change anything in original module, so you can use them side by side.

## Installation

    npm install co-mssql

## Quick Example

```javascript
var co = require('co'); 
var sql = require('co-mssql'); 

co(function * () {
    var connection = new sql.Connection({
        user: '...',
        password: '...',
        server: 'localhost',
        database: '...'
    });

    try {
    
        yield connection.connect();
        
        // Query

        var request = new sql.Request(connection);
        var recordset = yield request.query('select 1 as number');
        
        console.dir(recordset);
        
        // Stored Procedure
        
        var request = new sql.Request(connection);
        request.input('input_parameter', sql.Int, 10);
        request.output('output_parameter', sql.Int);
        var recordsets = yield request.execute('procedure_name');
        
        console.dir(recordsets);
        
    } catch (ex) {
        // ... error checks
    }
})();
```

<a name="license" />
## License

Copyright (c) 2014-2016 Patrik Simek

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---
_Source: https://npm.io/package/co-mssql · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
