sql-easy-builder is a lightweight SQL query builder for Node.js that supports SELECT, INSERT, UPDATE, DELETE, JOINs, subqueries, and common SQL functions with a fluent API. Version 3.3.0 is stable with active maintenance. It differentiates itself by offering a simple, chainable syntax, automatic parameterized queries to prevent SQL injection, TypeScript type definitions, and zero dependencies. Unlike heavier ORMs, it provides fine-grained control over SQL generation without abstracting away the database language.
npm install sql-easy-builderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates a SELECT query with alias, WHERE, ORDER DESC, and parameterized LIMIT using Builder's fluent API.
Use raw() or avoid dots in column aliases unless you intend table qualification.
Always destructure: const { query, values } = builder.build();Create a new Builder() for each query or clone if needed.
For OR, chain where with raw() or consult documentation.
Use { active: 1 } instead of { active: true }.Use import { Builder } from 'sql-easy-builder';Run: npm install sql-easy-builder
Ensure sql-easy-builder version >=3.0.0 and tsconfig includes node_modules types.
No dependency data recorded yet.