A simple MySQL ORM library providing basic model, link, and primary key support. Currently at version 0.5.11, it is in early development with incomplete documentation and no tests. It targets Node.js and requires a MySQL connection. Not suitable for production use due to its unstable API and lack of features like migrations or query grouping.
npm install mysql-recordsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
This example demonstrates connecting to a MySQL database and creating a simple model class to query all users.
Pin to a specific version and test thoroughly before upgrading.
Always pass a valid mysql connection object to mysqlRecords().
Avoid relying on any internal properties; use exposed Model methods.
Use async/await or Promises: await Model.find({}) instead of .do() callbacks.Use ESM import: import mysqlRecords from 'mysql-records'
Run: npm install mysql
Use the Model class returned from mysqlRecords(connection), not the one from direct import.