New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

wunderlink-streamsql

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wunderlink-streamsql - npm Package Compare versions

Comparing version 0.9.1 to 0.9.2

45

lib/drivers/prototype.js

@@ -47,22 +47,3 @@ const util = require('util')

var clauses = map(conditions, generateClauses(table, conditions))
if (relationships) {
forEach(relationships, function (rel, name) {
if (rel.type == 'hasMany') return
if (rel.foreign && rel.foreign.conditions) {
var subtable = table + JOIN_SEP + rel.foreign.as
for (var k in rel.foreign.conditions) {
conditions[k] = rel.foreign.conditions[k]
}
var subClauses = map(rel.foreign.conditions, generateClauses(subtable, conditions))
clauses = clauses.concat( subClauses )
}
})
}
return clauses.join(' AND ')
}
function generateClauses (table, conditions) {
return function (val, key) {
const clauses = map(conditions, function (val, key) {
const field = escapeId([table, key].join('.'))

@@ -78,3 +59,3 @@ var cnd = conditions[key]

return fmt('%s IN (%s)', field, cnd.join(','))
}
}

@@ -86,3 +67,3 @@ return cnd.map(function (subcnd) {

}).join(' AND ')
}
}

@@ -93,9 +74,11 @@ if (cnd !== null) {

const op = cnd.operation || cnd.op || '='
const op = cnd.operation || cnd.op || '='
if (cnd.value) cnd = cnd.value
return fmt('%s %s %s', field, op, escape(cnd))
}
}
return fmt('%s IS NULL', field)
}
})
return clauses.join(' AND ')
}

@@ -511,8 +494,16 @@ },

const statement = joinType
var statement = joinType
+ ' JOIN ' + this.escapeId(foreign.table)
+ ' AS ' + this.escapeId(foreignTableAlias)
+ ' ON ' + this.escapeId(localKey)
+ ' ON (' + this.escapeId(localKey)
+ ' = ' + this.escapeId(foreignKey)
+ ')'
if (foreign.conditions) {
for (var key in foreign.conditions) {
var condKey = this.escapeId(fmt('%s.%s', foreignTableAlias, key))
statement += fmt(' AND (%s=%s)', condKey, foreign.conditions[key])
}
}
return statement

@@ -519,0 +510,0 @@ },

2

package.json
{
"name": "wunderlink-streamsql",
"version": "0.9.1",
"version": "0.9.2",
"description": "Streaming SQL ORM",

@@ -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