Type-safe MySQL query builder for TypeScript (v2.0.0). Creates SQL queries with full TypeScript inference from user-defined table schemas, supporting select, insert, update, delete, joins, subqueries, transactions, and logging. Requires mysql2 at runtime. Release cadence appears slow (v2.0.0 significant change from v1). Differentiator: zero global side-effects, NULL vs undefined semantics correctly map to IS NULL vs skip, and where(undefined) is a no-op for dynamic conditions. Ships TypeScript types. Requires Node.js >= 18 and TypeScript >= 4.7.
npm install chill-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows creating a MySQL client with table schemas, selecting all rows, inserting, and updating with a condition.
Migrate to v2.0.0 API: define table types, use mysqlClient.tables.tableName.select(...).exec() instead of the previous chain.
Use only documented public API: `exec()`, `toSqlQuery()` is public but not guaranteed stable; consider refactoring.
Use null explicitly when you want to set a column to NULL, undefined when you want to omit the column from the query.
Run `npm install mysql2` or ensure it's in your package.json dependencies.
Use `mysqlClient.tables.user.select('*').exec()` not `tables.user.select(...)`.