finds.dev← search

// the find

balderdashy/waterline

★ 5,391 · JavaScript · MIT · updated Dec 2022

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

Waterline is the ORM bundled with Sails.js, offering a single query API across MySQL, Postgres, MongoDB, and a handful of other datastores via a pluggable adapter layer. It works standalone but is clearly designed to live inside Sails. If you're not using Sails, there are better-maintained options.

The adapter model is genuinely well-thought-out — the query normalization layer (forge-stage-two-query, forge-stage-three-query) does real work translating a unified criteria object into whatever the underlying adapter needs. Async/await support landed in v0.13 and the API is clean for basic CRUD. The test suite covers edge cases in type casting, association types, and lifecycle callbacks in reasonable depth. The ontology utilities (get-model, get-attribute) that resolve cross-datastore associations at query time are a clever piece of work.

Last commit was December 2022 — this project is effectively unmaintained. The documentation lives entirely on the Sails website, which makes standalone usage a guessing game from source code and StackOverflow. Cross-adapter queries with complex joins are limited or unsupported depending on the adapter, which is a sharp edge you'll hit in any real schema. No TypeScript types, no support for modern Node.js features like ESM, and the adapter ecosystem outside of the four core databases has been rotting for years.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →