mongo-sql

JSON →
library 6.2.0 ·javascript
verified Jun 5, 2026

Mongo-sql is a Node.js library that converts JSON-style query definitions into SQL strings, with a focus on PostgreSQL syntax. As of version 6.2.0 (stable, with irregular releases), it supports SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, JOINs, subqueries, and more. Unlike chain-style SQL builders, mongo-sql uses plain JavaScript objects to represent queries, making them easy to manipulate programmatically. It generates parameterized queries with `$N` placeholders to prevent SQL injection. Designed for extensibility and semantic clarity, it is ideal for developers who want a declarative, data-driven approach to SQL generation.