Generates SQL (stage 5 query) from a Waterline statement (stage 4 query) for Sails/Waterline SQL adapter authors. v3.0.6 is the current stable version; built on top of knex, supports PostgreSQL, MySQL, Oracle, and MSSQL dialects. Not backwards compatible with Waterline-Sequel. Release cadence is irregular. Key differentiator: standardizes SQL generation across SQL adapters in the Waterline ecosystem, replacing the older Waterline-Sequel library. Used internally by core Sails adapters.
npm install marciemarc425-waterline-sql-builderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: create a SQLBuilder instance for PostgreSQL, compile a Waterline statement, and output the SQL template and bindings array.
Update adapter code to use new Waterline statement format as described in https://github.com/balderdashy/waterline/blob/88bdfac31844e367a979661c4232fd5f521f3a33/ARCHITECTURE.md#stage-4-query
Run `npm install knex` alongside waterline-sql-builder.
Only use this package in adapter code; for app-level queries, use Waterline's model methods.
Provide a valid dialect string. For PostgreSQL, either 'postgresql' or 'postgres' works.
npm install knex
Use CommonJS require: const SQLBuilder = require('waterline-sql-builder');Use one of the supported dialects: 'postgresql', 'postgres', 'mysql', 'oracle', 'mssql'.