@catbee/mysql
A lightweight MySQL client for Node.js and TypeScript with safe parameters, connection pooling, transactions, query building, retry controls, middleware, and explicit UTC date utilities.
Documentation map
- Introduction - Features, installation, and the first client
- Basic usage - Queries, statements, result typing, and health checks
- Connection pooling - Pool configuration, timeouts, retries, and cancellation
- Transactions - Automatic transactions, manual control, and savepoints
- Query builder - Build parameterized SQL with fluent clauses
- Parameters and dates - Named placeholders, validation, and UTC date handling
- API reference - Exported classes, methods, types, and utilities
What the library provides
- Safe
?parameters and named:parameterplaceholders - Single persistent connections and pooled connections
- Typed query and execute result envelopes
- Automatic rollback with
db.transaction() - Savepoints for partial rollback inside an active transaction
- Retry, timeout, abort-signal, and strict statement controls
- Middleware and
EventEmitterlifecycle events - A fluent builder for common SQL statements
- Date and time helpers that consistently use UTC