Registry / database / sql-promise

sql-promise

JSON →
library0.0.19jsnpmunverified

A minimal SQL helper library that wraps common SQL databases with Promise-based APIs. Version 0.0.19 is stable but marked as 'designing' in development status, suggesting early-stage or experimental maturity. It simplifies SQL CRUD operations by returning Promises, enabling async/await patterns. The library lacks broad adoption and active maintenance cadence is unclear. Its key differentiator is a lightweight abstraction over multiple SQL backends, but it does not support modern TypeScript types or streaming.

npm install sql-promise
INSTALL
IMPORT
SIG · SQL-PROMISE
S
sql-promise
databasejavascriptv0.0.19
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SQLPromise
const SQLPromise = require('sql-promise')
import SQLPromise from 'sql-promise'
This package uses CommonJS and does not ship ESM. Named ES imports will not work.
query
const { query } = require('sql-promise')
Ensure you destructure after require. This is not available as a named ES import.

Shows basic usage: require sql-promise, use query function to run SQL and get a Promise.

const { query } = require('sql-promise'); async function getUsers() { try { const result = await query('SELECT * FROM users'); console.log(result); } catch (err) { console.error(err); } } getUsers();
Debug
Known issues
deprecatedPackage status is 'designing' and not actively maintained; may have unfixed bugs.
fix
Migrate to a maintained alternative like 'mysql2' or 'pg'.
affects: >=0.0.0
gotchaNo ES module support; import will fail with ESM syntax.
fix
Use require() or run Node in CommonJS mode.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'sql-promise'
Package may not be installed or is scoped.
fix
Run `npm install sql-promise` and ensure it's in node_modules.
TypeError: (0 , _sqlPromise.query) is not a function
Using wrong import style (ESM) with a CommonJS package.
fix
Use `const { query } = require('sql-promise')` instead.
Upgrade
Version history
0.0.19latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
Meta
1
OpenAI (training)
1
Resources
sql-promise — npm install sql-promise · libregistry