Registry / database / water-orm

water-orm

JSON →
library0.0.7jsnpmunverified

Waterline is a next-generation storage and retrieval engine and the default ORM used in the Sails framework. Current stable version is 0.13.x (not published on npm as a standalone package with version 0.0.7 which is an abandoned fork). It provides a uniform API for accessing different databases (MySQL, PostgreSQL, MongoDB, Redis, etc.) via adapters. Key differentiators include promise/async-await support (no callbacks since v0.13), a modular adapter system, and consistency across adapters. Release cadence is tied to Sails.js major releases. Originally developed by Balderdashy, now maintained by the Sails community. This specific npm package 'water-orm' version 0.0.7 is a monolith fork of Waterline and is likely unstable/abandoned.

npm install water-orm
INSTALL
IMPORT
SIG · WATER-ORM
W
water-orm
databasejavascriptv0.0.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Waterline
✓ import Waterline from 'waterline'
✗ const Waterline = require('waterline')
Waterline supports both ESM and CJS, but ESM is preferred for modern Node.js >= 12.
Collection
✓ import { Collection } from 'waterline'
✗ const { Collection } = require('waterline')
Collection is a named export used to define model classes.
default
✓ import waterline from 'waterline'
✗ import { Waterline } from 'waterline'
The default export is the Waterline constructor; named export 'Waterline' does not exist.

Shows how to initialize Waterline with an in-memory disk adapter, define a model, and create a record.

import Waterline from 'waterline'; import sailsDiskAdapter from 'sails-disk'; const waterline = new Waterline(); const User = Waterline.Model.extend({ identity: 'user', datastore: 'default', primaryKey: 'id', attributes: { id: { type: 'number', autoMigrations: { autoIncrement: true } }, name: { type: 'string' }, email: { type: 'string' } } }); waterline.registerModel(User); waterline.initialize({ adapters: { 'sails-disk': sailsDiskAdapter }, datastores: { default: { adapter: 'sails-disk' } } }, (err, ontology) => { if (err) return console.error(err); const UserModel = ontology.collections.user; UserModel.create({ name: 'Alice', email: 'alice@example.com' }) .then(user => console.log('Created:', user)) .catch(err => console.error(err)); });
Debug
Known issues
deprecatedWaterline v0.13+ requires Node.js >= 8 and uses async/await; callbacks are deprecated.
fix
Replace callbacks with async/await or promises.
affects: >=0.13
breakingWaterline v0.11 branch is for Sails v0.12; upgrading to v0.13 involves breaking changes.
fix
See upgrade guide at http://sailsjs.com/documentation/upgrading/to-v-1-0.
affects: >=0.12 <0.13
gotchaAdapter must be registered before initializing; using a missing adapter throws unclear errors.
fix
Ensure adapter package is installed and passed in the 'adapters' config.
affects: >=0.10
deprecatedThe 'water-orm' package (version 0.0.7) is an abandoned fork with no maintenance or security updates.
fix
Use the official 'waterline' package instead.
affects: =0.0.7
Errors
Common errors & fixes
Error: `registerModel` is not a function
Using obsolete API; 'registerModel' was removed in v0.13.
fix
Use waterline.registerModel() with a Model class; or use the new API via Waterline.Collection.
AdapterError: No adapter found for datastore 'default'.
Missing adapter configuration or adapter not installed.
fix
Install and configure an adapter (e.g., 'sails-disk') and pass it in the 'adapters' object.
TypeError: waterline.initialize is not a function
Using incorrect import or version mismatch (e.g., using named export instead of default).
fix
Use default import: import Waterline from 'waterline'.
Upgrade
Version history
0.0.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
16
OpenAI (training)
1
Resources
water-orm — npm install water-orm · libregistry