Git Product home page Git Product logo

sails-mongo's Introduction

Node.js and MongoDB on Sails.js/Waterline

sails-mongo

Sails.js/Waterline adapter for MongoDB.

Provides easy access to MongoDB from Sails.js & Waterline. This module is a Sails/Waterline adapter maintained by the core team. Its goal is to provide robust, easy-to-use access to MongoDB from Sails.js and Waterline.

As an adapter, this module implements a set of declarative interfaces, conventions, and best-practices for integrating with Mongo databases. Strict adherence to an adapter specification enables the (re)use of built-in generic test suites, standardized documentation, reasonable expectations around the API for your users, and overall, a more pleasant development experience for everyone.

Installation

To install this adapter, run:

$ npm install sails-mongo

Then connect the adapter to one or more of your app's datastores.

Usage

Visit Models & ORM in the docs for more information about using models, datastores, and adapters in your app/microservice.

Compatibility

This adapter implements the following methods:

Method Status Layer
registerDatastore Implemented N/A
teardown Implemented N/A
validateModelDef Implemented Modeled
createRecord Implemented Modeled (DML)
createEachRecord Implemented Modeled (DML)
updateRecords Implemented Modeled (DML)
destroyRecords Implemented Modeled (DML)
findRecords Implemented Modeled (DQL)
join not supported Modeled (DQL)
countRecords Implemented Modeled (DQL)
sumRecords Implemented Modeled (DQL)
avgRecords Implemented Modeled (DQL)
definePhysicalModel Implemented Migratable
dropPhysicalModel Implemented Migratable
setPhysicalSequence not supported Migratable

Questions?

See Extending Sails > Adapters > Custom Adapters in the Sails documentation, or check out recommended support options.

Contributing   Build Status   Build status on Windows

Please observe the guidelines and conventions laid out in the Sails project contribution guide when opening issues or submitting pull requests.

NPM

This repository includes a Docker Compose file that helps setting up the environment needed to run the test.

The npm run docker-test command runs the tests on a single run under the supported MongoDB version (at this time, up to 3.4). For more information, check MongoDB's Support Policy.

To run tests while developing, you can run npm run docker. This command opens a docker instance and opens a shell. From there you can run npm test to run the tests as many times as you need.

Special thanks

Thanks so much to Ted Kulp (@tedkulp) and Robin Persson (@prssn) for building the first version of this adapter back in 2013. Since then, it has evolved into a core adapter within the framework.

Bugs   NPM version

To report a bug, click here.

License

This core adapter is available under the MIT license.

As for Waterline and the Sails framework? They're free and open-source under the MIT License.

© The Sails Co.

image_squidhome@2x.png

sails-mongo's People

Contributors

particlebanana avatar mikermcneil avatar sgress454 avatar luislobo avatar devinivy avatar dmarcelino avatar zolmeister avatar dzcpy avatar josebaseba avatar tedkulp avatar nicoespeon avatar rua-yuki avatar ryanhs avatar ardentzeal avatar d4mn avatar jakutis avatar skrichten avatar simonccarter avatar prssn avatar mordred avatar ghernandez345 avatar ciaranmaher avatar vanetix avatar maxfierke avatar miccarr avatar rachaelshaw avatar radkodinev avatar xenomuta avatar roperzh avatar a127a127 avatar

Watchers

 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.