A TypeScript-friendly MySQL helper library (v2.0.6) built on top of the popular mysqljs/mysql package. It provides Promise-based async/await support for connections, queries, and transactions, along with fluent query builders for SELECT, UPDATE, INSERT, DELETE, and other operations. The library emphasizes ease of use with DbContext and automatic transaction commit/rollback. Key differentiators include built-in TypeScript type definitions, a simple query builder API, and a focus on reducing boilerplate for common MySQL operations. However, it is not actively maintained (last release 2019) and has limited community adoption compared to alternatives like mysql2 or knex.
npm install mysqlconnectorNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates connecting to MySQL, executing a query, and closing the connection using async/await.
Migrate to mysql2 with its promise API or use an ORM like Sequelize/TypeORM.
Switch to mysql2 which fixes those issues.
Use hostname property when creating connection.
Use `Select.Table(...)` or `Select.Properties(...)` directly.
Wrap transaction code in try-catch and handle rollback logic manually if needed.
Run: npm install mysql
Use: import { MySqlConnection } from 'mysqlconnector'Ensure tsconfig has esModuleInterop: true and import { Select } correctly.