sql-love (v1.1.0) provides classes for parsing and building SQL SELECT queries in Node, Bun, and Deno. It supports dynamic adding of clauses (JOIN, WHERE, ORDER BY, LIMIT, OFFSET), named placeholders, and prepared statement binding arrays. Unlike other SQL builders, it can parse existing SQL strings as base queries. It is written in TypeScript, zero-dependency, tree-shakeable, and features utility functions for pagination, grouping, and safe JSON extraction. Released under ISC license.
npm install sql-loveNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to parse a base SELECT query, dynamically add WHERE, ORDER BY, and LIMIT clauses, and compile to SQL with bindings.
Use your SQL client's `quoteIdentifier()` function for dynamic column/table names.
Use the formal `new SelectBuilder(sql, params)` signature; avoid relying on undocumented placeholder syntax.
Manually construct complex queries or use raw SQL strings outside of SelectBuilder.
Run `npm install sql-love` and ensure your import is `import { SelectBuilder } from 'sql-love'`.Use ESM import syntax or set `"type": "module"` in your package.json.
Use `--input-type=module` flag or rename file to .mjs.
No dependency data recorded yet.