mysql-build is a code generation tool (v0.9.29) that reads a MySQL database schema and produces a corresponding mjs module with CRUD functions (post, delete, put, get, equal) and a query method. It is a Node.js port of a Ruoyi feature, with no recent updates or clear release cadence. Compared to ORMs or Prisma, it is simpler but lacks schema migrations, type safety, and active maintenance.
npm install mysql-buildNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to a MySQL database, generates CRUD functions, and demonstrates usage of generated query method.
Add a setTimeout to exit after generation, or wrap in a callback if supported.
Use JSDoc comments or create a custom .d.ts file.
Use mysql2 instead, but note compatibility is not guaranteed.
Add "type": "module" to package.json or rename file to .mjs.
Run: npm install mysql