A minimal SQL ORM supporting MySQL and SQLite3. Current stable version is 1.1.0. Provides simple CRUD operations, pagination, and table introspection. Designed for lightweight use cases where full-featured ORMs like Sequelize or TypeORM are overkill. Release cadence is unknown; the package appears to be in maintenance mode with no recent updates. Key differentiator: minimal API with automatic table discovery.
npm install sqldb-ormNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connect to MySQL, get ORM class for table 'tb_user', and fetch all records.
Set the fourth argument to false if you only want to use existing tables.
For SQLite, pass the database file path as a string: orm.getClass('sqlite3', './test.db3', 'tb_user', true)Always treat results from findOne as an array and take the first element if needed.
Install sqlite3: npm install sqlite3 --save
Run: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; or use mysql2 package instead of mysql.
Use require('sqldb-orm') and ensure package is installed: npm install sqldb-orm