Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@synatic/noql

Package Overview
Dependencies
Maintainers
3
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@synatic/noql - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

17

lib/make/makeProjectionExpressionPart.js

@@ -43,6 +43,5 @@ const getParsedValueFromBinaryExpressionModule = require('./getParsedValueFromBinaryExpression');

if (expr.args && expr.args.value) {
const args = $check.array(expr.args.value)
? expr.args.value
: [expr.args.value];
if ((expr.args && expr.args.value) || fn.doesNotNeedArgs) {
const argsVal = expr.args ? expr.args.value : [];
const args = $check.array(argsVal) ? argsVal : [argsVal];
return fn.parse(

@@ -77,3 +76,3 @@ args.map((a) => makeArg(a, depth)),

if (expr.type === 'function') {
return makeProjectionExpressionPart(expr);
return makeProjectionExpressionPart(expr, depth);
}

@@ -86,3 +85,5 @@

return getParsedValueFromBinaryExpressionModule.getParsedValueFromBinaryExpression(
expr
expr,
null,
depth
);

@@ -98,3 +99,5 @@ }

if (expr.operator === '-') {
return {$multiply: [-1, makeProjectionExpressionPart(expr.expr)]};
return {
$multiply: [-1, makeProjectionExpressionPart(expr.expr, depth)],
};
} else {

@@ -101,0 +104,0 @@ throw new Error(

@@ -202,2 +202,4 @@ import type {Document, Sort} from 'mongodb';

jsonSchemaReturnType: JSONSchemaTypeName | SchemaFn;
/** Specifies if this function is allowed to run without parentheses. E.g. current_date */
doesNotNeedArgs?: boolean;
//TODO Rk, would be good to have a description here and auto generate docs

@@ -204,0 +206,0 @@ }

{
"name": "@synatic/noql",
"version": "2.1.2",
"version": "2.1.3",
"description": "Convert SQL statements to mongo queries or aggregates",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc