MySQL storage plugin for Mio, an ODM/ORM-style data access library. Current stable version is 0.9.0. This plugin provides MySQL integration for Mio models, supporting common query methods, pagination, custom table/column names, and date handling via node-mysql connection pools. Key differentiators include a Mongo-SQL-like query syntax, automatic pagination metadata on collections, and support for data formatters. Release cadence appears low; no recent updates. Consider alternatives like Sequelize or TypeORM for actively maintained database tooling.
npm install mio-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates setting up a Mio model with MySQL plugin, defining attributes, saving a record, and executing a find query with pagination.
Specify columnType: 'datetime' in attribute definition for human-readable dates.
Set settings.queryTimeout to a higher value or 0 to disable.
Use a fork or migrate to an alternative ORM that supports mysql2.
Always call Model.server(mysqlPlugin(...)) before using the model.
Run 'npm install mio' alongside mio-mysql.
Increase settings.queryTimeout in the plugin options.
Ensure your MySQL table has an AUTO_INCREMENT primary key or provide default values in model.
Ensure you called User.server(require('mio-mysql')(...)) before using findAll.