SQB is an extensible, multi-dialect SQL query builder and database connection framework for Node.js, version 3.9.2. It provides a unified API for building SQL queries across different database dialects (PostgreSQL, MySQL, SQLite, Oracle, MSSQL) with a focus on performance and low memory usage. Unlike knex.js, SQB emphasizes a more modular and extensible architecture, allowing custom dialects and query transformations. The library has had a moderate release cadence, with updates primarily for bug fixes and minor features. Key differentiators include support for latest JavaScript standards, lightweight footprint, and a powerful query coding scheme.
npm install sqbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to build a simple SELECT query with a PostgreSQL dialect and obtain SQL and parameters.
Upgrade to v3.x and refactor code using the new API. Check migration guide.
Always pass a dialect to `build()`: `query.build(dialect)`.
Use `import sqb from 'sqb'` (requires ESM) or set `"type": "module"` in package.json.
Use the dialect's `formatParams` method to see how parameters will be represented.
Use `import sqb from 'sqb'` (default export) which has the `select` method.
Pass a dialect: `query.build(new Dialect('postgresql'))`.Use a valid dialect name, e.g., 'postgresql' or 'mysql'. Check documentation for exact names.
No dependency data recorded yet.