Giter Club home page Giter Club logo

sails-mssqlserver's Introduction

sails logo

Sails-MSsqlserver

NPM version Build status Dependency Status

Microsoft SQL Server adapter for sails.js. Tested on SQL Server 2012 and 2014, but should support any SQL Server 2005 and newer. CI tests are run against SQL Server Express. Originally published by c*nect.

The development and acceptance of pull request have stalled on the original project. Therefore I am publishing this project with some enhancements.

Getting Started

1. Install

$ npm install sails-mssqlserver --save

2. Configure

config/models.js

{
  connection: 'sqlserver'
}

config/connections.js

{
  sqlserver: {
    adapter: 'sails-mssqlserver',
    user: 'sa',
    password: 'secureP@ssword',
    host: 'abc123.database.windows.net' // azure database
    database: 'mydb',
    options: {
      encrypt: true   // use this for Azure databases
    }
  }
}

Query Examples

Select with certain columns

Plugins.find({
  select: ['name','author'] // Optional
})
.where({
  framework: 'sails.js'
})
.then(function(results){
  if (results) {
    results.forEach(function(plugin)){
      console.log(plugin)
    }      
  } else {
    console.log('No plugins found')
 }
})

For further examples check out Sail's Waterline ORM page

License

MIT

Credits

This project was originally forked from cnect/sails-sqlserver in 2016. That repo was itself forked from swelham/sails-mssql in early 2015. The code in both of those repositories is also available under the MIT license.

sails-mssqlserver's People

Contributors

tjwebb avatar swelham avatar mistergf avatar some-say avatar kyle-mcguire avatar aelliott1485 avatar davepreston avatar miccarr avatar mikermcneil avatar raygesualdo avatar seich avatar

Watchers

Venvy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.