A library that lets you query MySQL databases using a MongoDB-like syntax in Node.js. Version 1.0.0-alpha14. Supports ESM and TypeScript with built-in type definitions. Key features include chaining methods like .where(), .field(), .limit(), .skip(), .get(), and MongoDB-style operators (eq, or, regex, like) that compile to SQL. Includes JSON field support with automatic parsing and tinyint-to-boolean conversion. Actively maintained with alpha stability.
npm install mysql-mongoNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to set up a database connection, define a collection, query with MongoDB-like syntax, and close the pool.
Pin to specific version and handle updates carefully.
Always call await db.close() after completing queries, especially in short-lived scripts.
Verify that JSON columns contain valid JSON strings; handle parsing errors explicitly.
Monitor the GitHub repository for updates and read changelogs before upgrading.
Run 'npm install mysql-mongo' or 'yarn add mysql-mongo'.
Ensure you call database(defineConfig(...)) and assign the result to db.
Double-check your query structure; refer to the documentation for supported operators and methods.