• Stars
    star
    5,412
  • Rank 7,602 (Top 0.2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 11 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An adapter-based ORM for Node.js with support for mysql, mongo, postgres, mssql (SQL Server), and more

Waterline logo

Master Branch Build Status Master Branch Build Status (Windows) StackOverflow (waterline) StackOverflow (sails)

Waterline is a next-generation storage and retrieval engine, and the default ORM used in the Sails framework.

It provides a uniform API for accessing stuff from different kinds of databases and protocols. That means you write the same code to get and store things like users, whether they live in MySQL, MongoDB, neDB, or Postgres.

Waterline strives to inherit the best parts of ORMs like ActiveRecord, Hibernate, and Mongoose, but with a fresh perspective and emphasis on modularity, testability, and consistency across adapters.

No more callbacks

Starting with v0.13, Waterline takes full advantage of ECMAScript & Node 8's await keyword.

In other words, no more callbacks.

var newOrg = await Organization.create({
  slug: 'foo'
})
.fetch();

Looking for the version of Waterline used in Sails v0.12? See the 0.11.x branch of this repo. If you're upgrading to v0.13 from a previous release of Waterline standalone, take a look at the upgrading guide.

Installation

Install from NPM.

  $ npm install waterline

Overview

Waterline uses the concept of an adapter to translate a predefined set of methods into a query that can be understood by your data store. Adapters allow you to use various datastores such as MySQL, PostgreSQL, MongoDB, Redis, etc. and have a clear API for working with your model data.

Waterline supports a wide variety of adapters, both core and community maintained.

Usage

The up-to-date documentation for Waterline is maintained on the Sails framework website. You can find detailed API reference docs under Reference > Waterline ORM. For conceptual info (including Waterline standalone usage), and answers to common questions, see Concepts > Models & ORM.

Help

Check out the recommended community support options for tutorials and other resources. If you have a specific question, or just need to clarify how something works, ask for help or reach out to the core team directly.

You can keep up to date with security patches, the Waterline release schedule, new database adapters, and events in your area by following us (@sailsjs) on Twitter.

Bugs   NPM version

To report a bug, click here.

Contribute

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

Tests

All tests are written with mocha and should be run with npm:

  $ npm test

License

MIT. Copyright © 2012-present Mike McNeil & The Sails Company

Waterline, like the rest of the Sails framework, is free and open-source under the MIT License.

image_squidhome@2x.png

More Repositories

1

sails

Realtime MVC Framework for Node.js
JavaScript
22,811
star
2

sails-docs

**Latest docs now live in the Sails core repo!** The source markdown files for the official Sails.js documentation, which gets compiled, squeezed, and stretched into HTML when we deploy the Sails website.
778
star
3

waterline-docs

WARNING: The content in this repo is out of date! See https://github.com/balderdashy/sails-docs for the most up-to-date documentation
452
star
4

sails-mongo

MongoDB adapter for Sails.js / Waterline ORM.
JavaScript
411
star
5

sails-mysql

MySQL adapter for Sails.js/Waterline
JavaScript
193
star
6

angularSails

AngularJS bindings for Sails. http://angularjs.org
JavaScript
184
star
7

sails.io.js

Browser SDK for communicating w/ Sails via sockets
JavaScript
182
star
8

sails-postgresql

PostgreSQL adapter for Sails.js
JavaScript
167
star
9

sails-redis

Lightweight Redis adapter for Node.js/Sails apps, focused on providing easy direct access to the configured, connected, ready-to-use Redis client instance. (Useful for caching.)
JavaScript
129
star
10

seed

A sample application generated by Sails.
JavaScript
91
star
11

mast

UI conventions built on top of Backbone.JS
JavaScript
81
star
12

sails-hook-email

Sails email hook
JavaScript
67
star
13

backbone-to-sails

Backbone SDK for communicating with Sails.js over Socket.io
JavaScript
64
star
14

skipper-s3

Streaming file uploads to S3
JavaScript
62
star
15

include-all

An easy way to include all files within a directory. Note: This is a fork of felixge's require-all which allows for optional includes.
JavaScript
56
star
16

sails-adapter-boilerplate

Example of a custom adapter (i.e. ORM plugin) for Waterline / Sails.js
JavaScript
45
star
17

sails-disk

Development-only persistent adapter for Sails.js / Waterline
JavaScript
44
star
18

captains-log

Lightweight logger with a simple pass-through configuration for use with fancier logging libraries. Used by the Sails framework. Optional support for colorized output, custom prefixes, and log levels (using npm's logging conventions.)
JavaScript
44
star
19

waterline-schema

This is the core schema builder used in the Waterline ORM.
JavaScript
33
star
20

activity-overlord-2-preview

A preview of Irl Nathan's Activity Overlord 2.0 (complete tutorial of Sails w/ Angular 1)
JavaScript
31
star
21

sails-generate

Master of ceremonies for generators in the Sails CLI
JavaScript
28
star
22

sails-generate-frontend

Generate the frontend part of a new Sails app.
JavaScript
26
star
23

sails-memory

In-memory, non-persistent adapter for Sails.js / Waterline
JavaScript
24
star
24

sails-hook-sockets

Implements socket.io support in Sails.
JavaScript
23
star
25

sails-hook-dev

A Sails hook that provides diagnostic / debugging information and levers during development.
JavaScript
22
star
26

sails-angular-seed

Boilerplate AngularJS app with Sails
JavaScript
21
star
27

enpeem

Lightweight wrapper for accessing npm programmatically (alternative to adding `npm` as a dependency)
JavaScript
19
star
28

sails-hook-orm

Implements support for Waterline ORM in Sails.
JavaScript
18
star
29

sails-hook-subapps

Sails hook for including child Sails apps into a parent app
JavaScript
18
star
30

sails-generate-generator

Generate a custom generator for Sails.js
JavaScript
18
star
31

merge-defaults

A recursive version of `_.defaults`.
JavaScript
16
star
32

waterline-adapter-tests

API integration tests for Waterline adapters
JavaScript
16
star
33

waterline-sequel

A SQL generator for use in Waterline Adapters
JavaScript
16
star
34

skipper-disk

Streaming file uploads to a server's local filesystem
JavaScript
14
star
35

sails-twitter

Twitter adapter for Sails.js
JavaScript
14
star
36

waterline-criteria

Utility library for use in Sails adapters where you need to filter a list of output using a criteria object
JavaScript
13
star
37

sails-generate-views-jade

Generate default views for a Sails app using Jade templates
HTML
11
star
38

billable

Tracks billable hours.
JavaScript
10
star
39

sails-generate-adapter

Generate a waterline/sails.js adapter.
JavaScript
10
star
40

fixture-stdout

A test fixture to intercept writes to stdout.
9
star
41

sails-generate-backend

Generate the backend part of a new Sails app.
JavaScript
9
star
42

sails-generate-new

Generate a new Sails app.
JavaScript
8
star
43

sails-riak

Riak adapter for Sails.js
CoffeeScript
7
star
44

machinepack-youtube

Communicate with the Youtube API to get video views, etc.
JavaScript
6
star
45

deretina

For supporting retina displays on the web: downsizes @2x images in the current directory
JavaScript
6
star
46

example-sails-proj-with-angular

JavaScript
6
star
47

sails-irc

IRC adapter for Sails.js
JavaScript
6
star
48

sails-generate-model

Generate a model in a Sails app.
JavaScript
5
star
49

sails-build-dictionary

DEPRECATED in Sails v1.0 (instead, just use [email protected] directly)
JavaScript
5
star
50

machinepack-slack

Use the Slack API from Node.js.
JavaScript
5
star
51

alcohol

Makes your dates prettier
4
star
52

sails-generate-api

API generator for Sails
JavaScript
4
star
53

booty

CoffeeScript
4
star
54

sails-util

Shared utilities between sails, waterline, etc.
JavaScript
4
star
55

sails-dirty

Sails.js adapter for @felixge's node-dirty
JavaScript
3
star
56

sails-elastic-search

Elastic Search Adapter for Sails JS
3
star
57

htassets

A mobile-compatible makeover for the default apache directory listing
JavaScript
3
star
58

Mobile-HTML-5-Video-Example

Cross-platform mobile video player using HTML 5
3
star
59

express-with-shared-mongo-session-example

An example of using a shared session in Express with MongoDB as the storage container
JavaScript
2
star
60

sails-generate-views

Generate default views for a Sails app
HTML
2
star
61

dev-workshop-conf

JavaScript
2
star
62

UserSwarm

JavaScript
2
star
63

sails-generate-controller

Generate a new controller file in an existing Sails app.
JavaScript
2
star
64

sails-generate-sails.io.js

Generate a sails.io.js browser SDK file at ./assets/js/dependencies/sails.io.js.
JavaScript
2
star
65

skipper-adapter-tests

Generic acceptance tests for Skipper adapters
JavaScript
1
star
66

waterline-cursor

Association/subquery helper
JavaScript
1
star
67

sails-generate-gruntfile

Generate gruntfile for a sails app.
JavaScript
1
star
68

stubble

A trimmed-down mustache.js for jQuery
JavaScript
1
star
69

sails-generate-hook

Generate a custom hook for Sails.js.
JavaScript
1
star
70

Naked

Chrome extension that opens links with stylesheets disabled for privacy.
1
star
71

sails-stringfile

translated/localized stringfiles containing messages from Sails core and dependencies
JavaScript
1
star
72

blueprint-api-example

An example of a Sails app using a blueprint API for use in "Run in Postman" buttons on the Sails website.
JavaScript
1
star
73

waterline-blob

Factory which generates waterline adapter definitions from blob definitions (eventually merge into waterline core)
JavaScript
1
star