A thin wrapper around the MySQL npm package providing a fluent query builder API for Node.js. Current stable version is 1.0.10, with low release cadence (last update in 2017). It simplifies CRUD operations with chainable methods like .where(), .fields(), .limit(), .order(), .count(), .find(), .select(), .add(), .update(), .delete(). Compared to knex or Sequelize, mysql-tk offers minimal abstraction with no ORM, making it suitable for quick scripts but lacking modern features like connection pooling, migrations, or TypeScript support.
npm install mysql-tkNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates setting up mysql-tk with configuration, inserting a record, and querying with a where clause.
Wrap in a Promise: new Promise((resolve, reject) => MysqlTK('t')...)Consider migrating to 'mysql2' and switching to a more active wrapper.
Set CONFIG immediately after require().
Use a separate connection pool from 'mysql' package and pass it to mysql-tk? (Not supported out of box.)
Always pass a callback to terminal methods.
Use: const MysqlTK = require('mysql-tk');Assign directly: MysqlTK.CONFIG = { ... };Ensure MySQL is running and host is correct (e.g., '127.0.0.1' instead of 'localhost').
Add a callback: .find((data) => console.log(data));