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

think-model

Package Overview
Dependencies
Maintainers
8
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

think-model - npm Package Compare versions

Comparing version 1.3.5 to 1.4.0

13

lib/model.js

@@ -436,3 +436,6 @@ function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }

if (helper.isEmpty(parsedData)) return Promise.reject(new Error('add data is empty'));
const lastInsertId = yield _this2.db().add(parsedData, options, replace);
if (replace) {
options.replace = replace;
}
const lastInsertId = yield _this2.db().add(parsedData, options);
const copyData = Object.assign({}, data, parsedData, { [_this2.pk]: lastInsertId });

@@ -505,3 +508,6 @@ yield _this2.afterAdd(copyData, options);

data = yield Promise.all(promises);
const insertIds = yield _this5.db().addMany(data, options, replace);
if (replace) {
options.replace = replace;
}
const insertIds = yield _this5.db().addMany(data, options);
promises = data.map(function (item, i) {

@@ -632,3 +638,4 @@ item[_this5.pk] = insertIds[i];

if (!fields) {
fields = yield _this10.db().getSchema();
const schema = yield _this10.db().getSchema();
fields = Object.keys(schema);
}

@@ -635,0 +642,0 @@ return _this10.db().selectAdd(fields, data[0].table, data[1]);

{
"name": "think-model",
"version": "1.3.5",
"version": "1.4.0",
"description": "An adapter-based ORM for ThinkJS 3.x",

@@ -5,0 +5,0 @@ "scripts": {

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