A flexible SQL query string builder for JavaScript and TypeScript, currently at version 6.0.7. It supports standard SQL queries (SELECT, UPDATE, INSERT, DELETE) and non-standard commands for MySQL, PostgreSQL, and Microsoft SQL Server. Features include fluent method-chaining, parameterized queries for safe value escaping, and first-class TypeScript support. Squel is suitable for production, works in Node.js and the browser, and ships as dual ESM + CommonJS with an IIFE bundle for CDN use. Major releases have broken changes: v5 removed the 'squel.flavours' namespace and v6 dropped Node <18. Alternatives include Knex for richer ORM features.
npm install squelNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic SELECT query building with squel, including parameterization and MySQL flavour.
Use import squel from 'squel' (ESM) or const squel = require('squel').default (CommonJS).Replace squel.flavours.mysql with squel.useFlavour('mysql').Upgrade Node.js to version 18 or later.
Replace .having('condition') with .where('condition') and ensure the query uses HAVING context.Use const squel = require('squel').default; or switch to ES import.Replace squel.flavours.mysql with squel.useFlavour('mysql').Change require('squel') to require('squel').default, or use ESM import.Run npm install squel, ensure Node.js >=18.
No dependency data recorded yet.