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

mql2

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mql2 - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

26

mql.js

@@ -40,4 +40,4 @@ import {

const is_plain_object = obj => !!obj && typeof obj == 'object' && obj.constructor == Object;
const is_column = f => f && f[SymbolColumn];
const is_tag = f => f && f[SymbolTag];
const is_column = f => !!(f && f[SymbolColumn]);
const is_tag = f => !!(f && f[SymbolTag]);
const is_injection = query => query == SymbolInjection;

@@ -79,5 +79,5 @@

me.column.originals.concat(pluck('left_key', me.rels)),
map(c => me.as + '.' + c),
map(c => is_string(c) ? me.as + '.' + c : c),
uniq)) :
tag(SymbolColumn);
tag(SymbolInjection);

@@ -227,13 +227,9 @@ const columnize = v =>

return Object.assign(tag(function() {
return {
text: originals
.map(v =>
is_string(v) ?
columnize(v) :
Object
.entries(v)
.map(v => v.map(dq).join(' AS '))
.join(', '))
.join(', ')
};
let sqls = deep_flat(originals
.map(v =>
is_string(v) ? [{ text: columnize(v) }, { text: ', ' }] :
is_tag(v) ? [v(), { text: ', ' }] :
[{ text: Object.entries(v).map(v => v.map(dq).join(' AS ')).join(', ')}, { text: ', ' }]));
sqls.pop();
return merge_query(sqls);
}), { [SymbolColumn]: true, originals: originals });

@@ -240,0 +236,0 @@ }

{
"name": "mql2",
"version": "1.0.3",
"version": "1.0.4",
"description": "query builder",

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

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