A lightweight Node.js database query executor supporting both JSON-based queries (jsonQuery) and raw SQL queries. Version 2.4.24 is current stable, with frequent updates. It supports MySQL, MS SQL, PostgreSQL, and SQLite across multiple drivers (mysql, mssql, pg, sql.js). Key differentiator: provides a declarative JSON query language abstraction over raw SQL, reducing SQL injection risks and simplifying dynamic query building. Uses a promise-based API. Active development with regular releases.
npm install node-database-executorVerified import paths — ran on the pinned version, not inferred.
Executes a JSON query against a MySQL database using promise API. Demonstrates query building and config setup.
Update code to use promise.executeQuery(config) instead of promise(config).then(...).
Replace const x = require('node-database-executor') with import { promise } from 'node-database-executor'.Always provide a password (can be empty string '' ) in dbConfig.
Use import { promise } from 'node-database-executor' then call promise.executeQuery()const queryExecutor = require('node-database-executor').promise;Verify dbConfig.user and dbConfig.password match your MySQL credentials.