
Security News
Next.js Patches Critical Middleware Vulnerability (CVE-2025-29927)
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
@synatic/noql
Advanced tools
NoQL Converts SQL statements to Mongo find statements or aggregation pipelines. NoQL supports mySQL and Postgres Syntax, and generates Mongo 3.6 or greater compatible queries.
For full docs and a playground to try NoQL out, visit https://noql.synatic.dev/
Install NoQL using the npm install command:
npm i @synatic/noql
NoQL outputs an object with the type, either query
or aggregate
, along with the components of the Mongo query. To use the output object, construct a query with MongoClient
from the MongoDB NodeJS Driver:
const SQLParser = require('@synatic/noql');
const {MongoClient} = require('mongodb');
(async () => {
try {
client = new MongoClient('mongodb://127.0.0.1:27017');
await client.connect();
const db = client.db('noql-test');
const parsedSQL = SQLParser.parseSQL('select id from `films` limit 10');
if (parsedSQL.type === 'query') {
console.log(
await db
.collection(parsedSQL.collection)
.find(parsedSQL.query || {}, parsedSQL.projection || {})
.limit(parsedSQL.limit || 50)
.toArray()
);
} else if (parsedSQL.type === 'aggregate') {
console.log(
await db
.collection(parsedSQL.collections[0])
.aggregate(parsedSQL.pipeline)
.toArray()
);
}
} catch (exp) {
console.error(exp);
}
})();
NoQL outputs an object with the type, either query
or aggregate
, along with the components of the Mongo query. Here are some examples of the output:
For a straight query:
SQLMongoParser.parseSQL('select id from `films` where `id` > 10 limit 10');
NoQL will output:
{
"limit": 10,
"collection": "films",
"projection": {
"id": "$id"
},
"query": {
"id": {
"$gt": 10
}
},
"type": "query"
}
For an aggregate query:
SQLMongoParser.makeMongoAggregate(
'select id from `films` where `id` > 10 group by id'
);
NoQL will output:
{
"pipeline": [
{
"$match": {
"id": {
"$gt": 10
}
}
},
{
"$group": {
"_id": {
"id": "$id"
}
}
},
{
"$project": {
"id": "$_id.id",
"_id": 0
}
}
],
"collections": ["films"]
}
See more in the full docs at https://noql.synatic.dev/
FAQs
Convert SQL statements to mongo queries or aggregates
The npm package @synatic/noql receives a total of 646 weekly downloads. As such, @synatic/noql popularity was classified as not popular.
We found that @synatic/noql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.
Security News
A survey of 500 cybersecurity pros reveals high pay isn't enough—lack of growth and flexibility is driving attrition and risking organizational security.
Product
Socket, the leader in open source security, is now available on Google Cloud Marketplace for simplified procurement and enhanced protection against supply chain attacks.