Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
feat: update dependencies and improve join performance
Browse files Browse the repository at this point in the history
  • Loading branch information
davepreston committed May 21, 2019
1 parent 71a6291 commit 655da19
Show file tree
Hide file tree
Showing 13 changed files with 3,076 additions and 721 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ ssl
.idea
nbproject
npm-debug.log
local.js
runner.js
.vscode
73 changes: 31 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,41 @@
## <a href="http://www.cnectdata.com/"><img src="http://www.cnectdata.com/wp-content/uploads/2014/04/cnect-logo-200x57-20141118.png" height='32px' /></a> All-in-One Data Management Stack
# Sails-MSSQL Adapter

### sails-sqlserver
[![NPM version][npm-image]][npm-url]
[![Build status][ci-image]][ci-url]
[![Dependency Status][daviddm-image]][daviddm-url]
MSSQL adapter for Sails framework and Waterline ORM. Allows you to use MSSQL via your models to store and retrieve data. Also provides a `query()` method for a direct interface to execute raw SQL commands.

Official Microsoft SQL Server adapter for [sails.js](http://sailsjs.org/). Tested on SQL Server 2012 and 2014,
but should support any SQL Server 2005 and newer. CI tests are run against SQL
Server Express. Published by [c*nect](http://www.cnectdata.com/).
## Installation

### 1. Install
```sh
$ npm install sails-sqlserver --save
Install from NPM.

```bash
$ npm install sails-mssql
```

### 2. Configure
## Branch Structure

#### `config/models.js`
```js
{
connection: 'sqlserver'
}
```
| sails.js version | sails-mssql version | sails-mssql branch |
| ----------- | ----------- | ----------- |
| 1.x | 2.x | master |
| 0.12.x | 1.x | 0.12.x |

## Bugs &nbsp; [![NPM version](https://badge.fury.io/js/sails-mssql.svg)](http://npmjs.com/package/sails-mssql)

To report a bug, post on the [issues tab](https://github.com/intel/sails-mssql/issues).

## Contributing

[![NPM](https://nodei.co/npm/sails-mssql.png?downloads=true)](http://npmjs.com/package/sails-mssql)

#### `config/connections.js`
```js
{
sqlserver: {
adapter: 'sails-sqlserver',
user: 'cnect',
password: 'pass',
host: 'abc123.database.windows.net' // azure database
database: 'mydb',
options: {
encrypt: true // use this for Azure databases
}
}
}
### Running the tests

To run the tests, point this adapter at your database by specifying a [connection URL](http://sailsjs.com/documentation/reference/configuration/sails-config-datastores#?the-connection-url) and run `npm test`:

```
WATERLINE_ADAPTER_TESTS_URL=mssql://root:myc00lP4ssw0rD@localhost/adapter_tests npm test
```

> For more info, see [**Reference > Configuration > sails.config.datastores > The connection URL**](http://sailsjs.com/documentation/reference/configuration/sails-config-datastores#?the-connection-url), or [ask for help](http://sailsjs.com/support).
## License
MIT

[npm-image]: https://img.shields.io/npm/v/sails-sqlserver.svg?style=flat-square
[npm-url]: https://npmjs.org/package/sails-sqlserver
[sails-logo]: http://cdn.tjw.io/images/sails-logo.png
[sails-url]: https://sailsjs.org
[ci-image]: https://img.shields.io/circleci/project/cnect/sails-sqlserver/master.svg?style=flat-square
[ci-url]: https://circleci.com/gh/cnect/sails-sqlserver
[daviddm-image]: http://img.shields.io/david/cnect/sails-sqlserver.svg?style=flat-square
[daviddm-url]: https://david-dm.org/cnect/sails-sqlserver

MIT License

Loading

0 comments on commit 655da19

Please sign in to comment.