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

knex-model

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knex-model - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

11

lib/relation.js

@@ -60,2 +60,13 @@ 'use strict';

Relation.prototype.update = function(params) {
if(this.type !== 'hasOne') {
throw new Error('not support update on `' + this.type + '` relation');
}
var source = this.model;
var foreign = this.target;
return foreign.where(this.keyField, source.id).update(params);
};
Relation.prototype.delete = function(params) {

@@ -62,0 +73,0 @@ var knex = this.target.getKnex();

2

package.json
{
"name": "knex-model",
"version": "0.1.5",
"version": "0.1.6",
"description": "Small 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