MoSQL is a JavaScript library for generating SQL statements from JSON objects, version 6.3.7. It supports a MongoDB-like query language, translating JSON queries into parameterized SQL for MySQL-style databases. The library covers SELECT, INSERT, UPDATE, DELETE, CREATE TABLE, and more, with support for joins, subqueries, and aggregation. Unlike chaining-based builders, MoSQL uses plain objects, enabling introspection and manipulation of queries. Moderate release cadence; last major updates added TypeScript declarations and improved subquery support.
npm install alcumus-mongo-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a JSON query object and calls the default export to get SQL string and parameterized values.
Update imports to use 'alcumus-mongo-sql' instead of 'mongo-sql'.
Avoid dynamic table/column names or sanitize them before building the query object.
Include $set or $unset operators in the update query object.
Install and import from 'alcumus-mongo-sql' instead.
Use: import mongoSql from 'alcumus-mongo-sql' or const mongoSql = require('alcumus-mongo-sql').Use type: 'remove' for delete operations.