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

uniqorm

Package Overview
Dependencies
Maintainers
1
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

uniqorm - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

28

lib/Model.js

@@ -100,5 +100,11 @@ /* UNIQORM

keyValues = this._prepareKeyValues(keyValues);
options = options || {};
if (this._hooks && this._hooks.get)
return this._hooks.get(keyValues, options, callback);
const opts = merge({}, options);
merge(opts, {
where: this._prepareWhereforKeys(keyValues),
where: keyValues,
limit: 1,

@@ -138,3 +144,3 @@ offset: 0,

return promisify.fromCallback((cb) => this.list(options, cb));
options = options || {};
options.attributes = options.attributes ||

@@ -180,2 +186,5 @@ Object.getOwnPropertyNames(this.fields);

if (this._hooks && this._hooks.create)
return this._hooks.create(values, options, callback);
const silent = options.silent || this.owner.options.silent;

@@ -259,4 +268,8 @@ values = this._prepareUpdateValues(values, {

options = options || {};
if (this._hooks && this._hooks.create)
return this._hooks.create(values, options, callback);
const silent = options.silent || this.owner.options.silent;
let where = options.where || this._prepareWhereforKeys(values);
let where = options.where || this._prepareKeyValues(values);
where = Array.isArray(where) ? where : [where];

@@ -334,2 +347,7 @@ /* prepare update values */

keyValues = this._prepareKeyValues(keyValues);
options = options || {};
if (this._hooks && this._hooks.create)
return this._hooks.create(keyValues, options, callback);
const opts = merge({}, options);

@@ -340,3 +358,3 @@ /* Prepare query */

.delete(this.tableNameFull)
.where(this._prepareWhereforKeys(keyValues));
.where(keyValues);

@@ -510,3 +528,3 @@ /* Execute query */

_prepareWhereforKeys(keyValues) {
_prepareKeyValues(keyValues) {
if (!(this.keyFields && this.keyFields.length))

@@ -513,0 +531,0 @@ throw new ErrorEx('No key field defined for model "%s"', this.name);

2

package.json
{
"name": "uniqorm",
"description": "Easy to use, multi-dialect ORM framework for JavaScript",
"version": "1.5.0",
"version": "1.5.1",
"author": "Panates Ltd.",

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