Reputation: 122
I want to preface this with saying that I really like sails.js for a simple MVC framework, but feel that it lacks in its documentation and api reference.
I searched all over to try and find any information on a good mssql (SQL server) adapter for Sails.js, but cannot find one. I am hoping someone has come across one, and could recommend it. I also looked into building a custom adapter, but found the documentation to not be helpful. Any help on this topic would be greatly appreciated. Thank you.
Upvotes: 7
Views: 3587
Reputation: 16
Another current option is https://www.npmjs.com/package/sails-mssql
(https://github.com/intel/sails-mssql).
Upvotes: 0
Reputation: 399
Sails-sql is currently the latest adapter for MySQL/MSSQL (eventually PostgreSQL as well). It's currently safe, fine-tuned, and upgraded for use in production with MySQL and MSSQL. Most developments are primarily pending for PostgreSQL at the moment.
Upvotes: 0
Reputation: 15018
There is now: https://github.com/cnect/sails-sqlserver
Complete with sails 0.10 associations support, and fully unit tested against the Waterline spec:
Upvotes: 2
Reputation: 74
sails-mssql is working fine for me on 0.10.x, here's a gist of how to configure it, using sails-mssql 0.10.x
https://gist.github.com/hybrisCole/868f979d8d129247a2da
my package.json has this: "sails-mssql": "git://github.com/jaredfromsubway/sails-mssql.git#master",
Upvotes: 0
Reputation: 201
I have recently started building a sails adapter for MSSQL based on the node-sqlserver module.
It isn't finished yet but I have finished the main parts of the adapter and it still needs testing, but there is enough there to get going.
It can be found at https://github.com/swelham/sails-mssql
Upvotes: 3
Reputation: 2416
We don't currently have a MS SQL Server adapter but it's something I'd love to add. There is a basic definition of the various interfaces and how adapters are created at: API Adapter Interface.
If anyone would like to tackle this you can use the Sails MySQL Adapter or the Sails PostgreSQL Adapter as examples.
I don't have access to a MS SQL Server to build one out but there is an Integration Test library I use to build out adapters that support the CRUD interface: Waterline Adapter Tests.
Upvotes: 3
Reputation: 1503
Technically since Sails is base on express.js you could use custom express middleware to specify the use of your an adapter that has already been created.
The first one is the top rated adapter checkout https://nodejsmodules.org/tags/mysql
Otherwise you can just use the waterline ORM and the MySQL adapter that is provided for sails.js
https://github.com/balderdashy/sails-mysql
For documentation on how to use waterline models checkout the 0.9x docuemntation http://sailsjs.org/#!documentation/models
Upvotes: 0