Gimlet is a Node.js module that provides a lightweight database access layer on top of common drivers like MySQL. It adds high-level validations, helper methods (create, remove, queryRow, queryOne), and Record instances with change tracking, saving, and freezing capabilities. As of v2.1.0, it is actively maintained with gradual updates. Unlike ORMs/ODMs, developers write raw SQL queries. Dependencies: mysql driver must be installed separately.
npm install gimletVerified import paths — ran on the pinned version, not inferred.
Connect to MySQL, query users, modify a record, and save changes.
Call connection.open(cb) if you need immediate connection check.
Use driver-specific POINT handling if stability is critical.
Ensure connection is open before calling save, or handle errors.
npm install gimlet
Start MySQL or verify connection string: mysql://user:pass@localhost:3306/db