This repository has been archived by the owner on Feb 28, 2023. It is now read-only.
forked from swelham/sails-mssql
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update dependencies and improve join performance
- Loading branch information
1 parent
71a6291
commit 655da19
Showing
13 changed files
with
3,076 additions
and
721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,6 @@ ssl | |
.idea | ||
nbproject | ||
npm-debug.log | ||
local.js | ||
runner.js | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 [![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 | ||
|
Oops, something went wrong.