A lightweight TypeScript-friendly MySQL client for Node.js that provides a fluent API for query construction, inserts, updates, and deletes. Version 1.3.17 (latest) is actively maintained with monthly releases. Unlike raw mysql2 or knex, it offers a chainable builder pattern inspired by LINQ, supports automatic pagination, join, and subquery helpers. Includes TypeScript definitions, ES module and CommonJS support. Targets Node.js 8+.
npm install ali-h-mysql-tsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic CRUD operations: insert, select (findOne), update, and delete using the fluent builder pattern.
Use require('ali-h-mysql-ts') or import from 'ali-h-mysql-ts'Run npm install mysql2 alongside ali-h-mysql-ts
Use the builder API instead of raw SQL where possible
Set timezone to '+00:00' for UTC or the appropriate offset
Use CommonJS require() or upgrade Node.js to 12+
Explicitly set column values or omit them
Use import { literals } from 'ali-h-mysql-ts' instead of db.literalsInstall ali-h-mysql-ts (npm install ali-h-mysql-ts) and update require/import
Run npm install mysql2
Ensure you use the builder: db.select('*').from('table')...Use .insert() with .onDuplicateKeyUpdate() or check existence first