A JavaScript SQL string builder for PostgreSQL, MySQL, Microsoft SQL Server, Oracle, and SQLite dialects. This fork (v1.0.5) updates the lodash dependency to resolve a vulnerability in the original `brianc/node-sql` package. Active maintenance unknown; no recent releases. Key differentiator: builds parameterized SQL queries programmatically with composable table definitions, joins, and named queries. TypeScript types included.
npm install sql-bulkinsertNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic query building: define a table, select columns, add where clause, and get parameterized SQL text and values.
Call sql.setDialect('postgres') (or your target) at the start of your app.Use sql-bulkinsert >=1.0.0 instead of brianc/node-sql.
Use { name: 'state_or_province', property: 'state' } in column definition.Add custom type declarations if needed, or use `as any` as a workaround.
Ensure the query chain includes .from() and .select()/update()/delete() before .toQuery().
Use version >=1.0.0 of sql-bulkinsert and import it correctly (ESM: import sql from 'sql-bulkinsert').
Use { name: 'table', columns: ['col1', 'col2'] } or { name: 'table', columns: [{ name: 'col1' }] }.