A simple JavaScript MySQL library for Node.js that provides an object-oriented API to perform CRUD operations without writing raw SQL. Version 1.5.12 is the latest stable release with low release cadence (last updated years ago). Differentiates by using Scheme/Table classes with structure constants for type safety, pool connection support, and optional read-only replica configuration. Suitable for small projects or prototypes but lacks modern features like promises, TypeScript types, or migration management.
npm install jssqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a MySQL database using JSSQL with connection pooling, creates a table scheme, and performs an insert followed by a findOne query.
Use a callback or setTimeout before calling find after save, or consider using a different library with promise support.
Wrap callbacks in promises manually or migrate to a modern MySQL library like mysql2 or knex.
Audit your dependency tree and consider replacing jssql to avoid supply chain risks.
Run 'npm install jssql' in your project directory.
Use 'const { Database } = require('jssql');' instead of 'const Database = require('jssql');'Check your host, user, password, and database name in the Database constructor.