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

waterline

Package Overview
Dependencies
Maintainers
3
Versions
165
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

waterline - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

21

lib/waterline/adapter/sync/strategies/alter.js

@@ -41,3 +41,22 @@ /**

var collectionName = _.find(self.query.waterline.schema, {tableName: self.collection}).identity;
// Create a mapping of column names -> attribute names
var columnNamesMap = _.reduce(self.query.waterline.schema[collectionName].attributes, function(memo, val, key) {
// If the attribute has a custom column name, use it as the key for the mapping
if (val.columnName) {
memo[val.columnName] = key;
}
// Otherwise just use the attribute name
else {
memo[key] = key;
}
return memo;
}, {});
// Transform column names into attribute names using the columnNamesMap
attrs = _.keys(attrs).map(function(key) {
return columnNamesMap[key];
});
//

@@ -66,3 +85,3 @@ // TODO:

// on SQL databases the query will fail with "unknown field" error.
self.find({select: _.keys(attrs)}, function (err, existingData) {
self.find({select: attrs}, function (err, existingData) {

@@ -69,0 +88,0 @@ if (err) {

2

package.json
{
"name": "waterline",
"description": "An ORM for Node.js and the Sails framework",
"version": "0.10.2",
"version": "0.10.3",
"homepage": "http://github.com/balderdashy/waterline",

@@ -6,0 +6,0 @@ "contributors": [

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