mysql-shaman is a lightweight ORM for Node.js that provides a simple, familiar syntax for MySQL CRUD operations, wrapping the official mysql package. Version 1.0.11 (latest) ships TypeScript types and includes a CLI for database management. Unlike heavy ORMs like Sequelize or TypeORM, it focuses on minimalism and discoverability, allowing developers to use JavaScript expressions instead of raw SQL strings. Released under the IoT Shaman project, it targets developers who want a thin abstraction over mysql with minimal configuration.
npm install mysql-shamanNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows setting up a database context with a User model, initializing connection, and performing a simple find query.
Ensure model property names match table names exactly, including case.
Always use parameterized queries: provide 'conditions' with '?' placeholders and pass values in 'args'.
Use find() with appropriate filters.
Run `npm install mysql-shaman` and ensure import matches 'import { ... } from 'mysql-shaman''Either update mysql driver or run `ALTER USER 'user'@'host' IDENTIFIED WITH mysql_native_password BY 'password';`
Ensure `database.initialize()` is called and awaited before performing queries.