Registry / database / node-query

node-query

JSON →
library0.3.3jsnpmunverified

General SQL query interface for hybrid data sources, version 0.3.3. Provides a unified SQL-like query engine that abstracts over multiple backends (MySQL, OTS, HBase, PostgreSQL, HTTP, etc.). Designed for Node.js environments (>=0.8.0). Release cadence is unclear; last update appears to be early. Key differentiator: it allows querying diverse data sources with a single SQL interface, but is early-stage and not actively maintained.

npm install node-query
INSTALL
IMPORT
SIG · NODE-QUERY
N
node-query
databasejavascriptv0.3.3
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.

default
import nquery from 'nquery'
const nquery = require('nquery')
ESM default import
MQuery
import { MQuery } from 'nquery'
const MQuery = require('nquery').MQuery
Named export for the main class
createQuery
import { createQuery } from 'nquery'
Factory function to create queries

Shows how to initialize nquery with multiple data sources (MySQL and HTTP) and execute a parameterized SQL query.

import nquery from 'nquery'; const db = nquery({ mysql: { host: process.env.MYSQL_HOST ?? 'localhost', user: process.env.MYSQL_USER ?? 'root', password: process.env.MYSQL_PASSWORD ?? '', database: 'test' }, http: { baseURL: 'https://api.example.com' } }); const result = await db.query('SELECT * FROM mysql.users WHERE id = ?', [1]); console.log(result);
Debug
Known issues
breakingRequires Node.js >=0.8.0; may not work on modern Node versions (12+) due to deprecated APIs.
fix
Use Node.js 10.x or older, or find an alternative library.
affects: >=12.0.0
deprecatedPackage is not actively maintained; last update was years ago. No official ESM support.
fix
Consider using a modern query builder like Knex or Sequelize for SQL databases.
affects: >=0.3.3
gotchaNo TypeScript definitions; types are not included.
fix
Install @types/nquery if available, or declare module manually.
affects: >=0.0.0
gotchaBackend drivers (e.g., mysql, pg) must be installed separately but are not listed as peer dependencies.
fix
Install required database drivers manually (e.g., npm install mysql).
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'nquery'
Package not installed or npm registry issues.
fix
Run 'npm install nquery'.
nquery is not a function
Using require with default export incorrectly.
fix
Use 'const nquery = require('nquery').default' or switch to ESM import.
Cannot read property 'query' of undefined
Initialization object missing required fields for backend.
fix
Ensure you pass a configuration object with at least one backend connection settings.
Upgrade
Version history
0.3.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
node-query — npm install node-query · libregistry