Epic SQL (v5.0.5) is a MySQL ORM for Node.js with a focus on simplifying database interactions by eliminating raw SQL queries. It provides a schema-based approach for defining models using custom data types like SQLString and SQLBoolean, with support for indexes, unique constraints, and enums. The library includes a connection manager with sync and logging options. Compared to Sequelize or TypeORM, Epic SQL offers a more minimalistic API and lighter footprint, but has a smaller community and fewer features. Release cadence is irregular; the current version is stable but may lack ongoing development.
npm install epic-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a schema for users, connects to MySQL, inserts a row, and logs the result.
Set { sync: false } in production environments.Always use Schema.new() to obtain a locked instance.
Import from 'epic-sql' instead of 'epic'.
Run 'npm install epic-sql' and ensure the import is 'epic-sql', not a subpath.
Use import { Schema } from 'epic-sql' and instantiate correctly: const Users = new Schema('users', {...}); Users.new();Verify host, user, and password in Connector config. Ensure the MySQL server is running and accepts connections.