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

waterline

Package Overview
Dependencies
Maintainers
2
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.0-rc1 to 0.10.0-rc2

1

lib/waterline/core/dictionary.js

@@ -60,3 +60,2 @@ /**

*
*
* @param {Array} ordered

@@ -63,0 +62,0 @@ * @return {Object}

37

lib/waterline/core/index.js

@@ -42,4 +42,3 @@ /**

this.hasSchema = Object.getPrototypeOf(this).hasOwnProperty('schema') ?
this.schema : true;
this.hasSchema = Core._normalizeSchemaFlag.call(this);

@@ -107,1 +106,35 @@ this.migrate = Object.getPrototypeOf(this).hasOwnProperty('migrate') ?

};
/**
* Normalize Schema Flag
*
* Normalize schema setting by looking at the model first to see if it is defined, if not look at
* the connection and see if it's defined and if not finally look into the adapter and check if
* there is a default setting. If not found anywhere be safe and set to true.
*
* @api private
* @return {Boolean}
*/
Core._normalizeSchemaFlag = function() {
// If schema is defined on the collection, return the value
if(hasOwnProperty(Object.getPrototypeOf(this), 'schema')) {
return Object.getPrototypeOf(this).schema;
}
// Grab the first connection used
if(!this.connection || !Array.isArray(this.connection)) return true;
var connection = this.connections[this.connection[0]];
// Check the user defined config
if(hasOwnProperty(connection, 'config') && hasOwnProperty(connection.config, 'schema')) {
return connection.config.schema;
}
// Check the defaults defined in the adapter
if(!hasOwnProperty(connection, '_adapter')) return true;
if(!hasOwnProperty(connection._adapter, 'schema')) return true;
return connection._adapter.schema;
};

@@ -154,3 +154,3 @@ /**

attr.type = type;
attr.type = type.toLowerCase();
attr.model = value[key].toLowerCase();

@@ -157,0 +157,0 @@ attr.foreignKey = true;

@@ -343,3 +343,3 @@

if(!hasOwnProperty(attr, 'references')) continue;
var attrCollection = attr.references.toLowerCase();
var attrCollection = attr.references;

@@ -346,0 +346,0 @@ if(attrCollection !== identity) {

@@ -122,11 +122,11 @@ /**

var self = this,
attr,
joinKey = false,
usedInJoin;
var self = this;
// Look at each key in the object and see if it was used in a join
Object.keys(value).forEach(function(key) {
var joinKey = false,
attr,
usedInJoin;
// If showJoins wasn't set or no joins were found there is nothing to modelize

@@ -133,0 +133,0 @@ if(!self.options.showJoins || !self.options.joins) return;

{
"name": "waterline",
"description": "An ORM for Node.js and the Sails framework",
"version": "0.10.0-rc1",
"version": "0.10.0-rc2",
"homepage": "http://github.com/balderdashy/waterline",

@@ -25,3 +25,3 @@ "contributors": [

"q": "~0.9.7",
"waterline-schema": "~0.1.0",
"waterline-schema": "~0.1.1",
"node-switchback": "~0.0.4"

@@ -28,0 +28,0 @@ },

@@ -9,5 +9,5 @@ ![image_squidhome@2x.png](http://i.imgur.com/7rMxw.png)

It provides a uniform API for accessing stuff from different kinds of databases, protocols, and 3rd party APIs. That means you write the same code to get users, whether they live in MySQL, LDAP, MongoDB, or Facebook.
It provides a uniform API for accessing stuff from different kinds of databases, protocols, and 3rd party APIs. That means you write the same code to get and store things like users, whether they live in Redis, mySQL, LDAP, MongoDB, or Postgres.
At the same time, Waterline aims to learn lessons and maintain the best features from both Rails' ActiveRecord and Grails' Hibernate ORMs.
Waterline strives to inherit the best parts of ORMs like ActiveRecord, Hibernate, and Mongoose, but with a fresh perspective and emphasis on modularity, testability, and consistency across adapters.

@@ -14,0 +14,0 @@ ## Installation

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