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

fib-orm

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fib-orm - npm Package Compare versions

Comparing version 1.2.2 to 1.3.0

30

lib/patch.js

@@ -164,2 +164,29 @@ var util = require('util');

function patchInsert(table, data, keyProperties, cb) {
var q = this.query.insert()
.into(table)
.set(data)
.build();
this.db.all(q, function (err, info) {
if (err) return cb(err);
if (!keyProperties) return cb(null);
var i, ids = {},
prop;
if (keyProperties.length == 1 && keyProperties[0].type == 'serial') {
ids[keyProperties[0].name] = info.insertId;
return cb(null, ids);
} else {
for (i = 0; i < keyProperties.length; i++) {
prop = keyProperties[i];
// Zero is a valid value for an ID column
ids[prop.name] = data[prop.mapsTo] !== undefined ? data[prop.mapsTo] : null;
}
return cb(null, ids);
}
}.bind(this));
};
function execQuerySync(query, opt) {

@@ -192,2 +219,5 @@ if (arguments.length == 2)

if (db.driver.dialect === 'sqlite')
db.driver.insert = patchInsert;
var def = db.define;

@@ -194,0 +224,0 @@ db.define = function (name, properties, opts) {

2

package.json
{
"name": "fib-orm",
"version": "1.2.2",
"version": "1.3.0",
"description": "Object Relational Mapping for fibjs",

@@ -5,0 +5,0 @@ "main": "lib",

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