smart-mysql is a Node.js library that allows developers to interact with MySQL databases using NoSQL-style commands, such as insert, update, delete, and select with simple JavaScript objects, abstracting away raw SQL. The current version is 0.9.19, with no recent updates since 2015, indicating it is likely abandoned. It provides a MongoDB-like API familiar to developers transitioning from NoSQL databases, but lacks modern features, proper error handling, and is not production-ready. It differs from alternatives like knex or sequelize by being lighter and simpler, but is largely unmaintained and insecure.
npm install smart-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic CRUD operations: insert, select with table, update, and delete using NoSQL-style objects.
Do not expect callback to return rows or error objects; it only returns truthy/falsy.
Use db.collection('user').insert({...}) for single inserts, not Insert.Avoid using this library in production. Migrate to a maintained ORM with parameterized queries.
Use an actively maintained ORM like knex or sequelize.
const db = new smart_mysql({...});Run 'npm install smart-mysql' and ensure node_modules is present.
Use lowercase db.collection('user').insert({data}, callback).Check database credentials and ensure table exists. Add error logging to callback.