think-model
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -543,3 +543,3 @@ 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"); }); }; } | ||
options = yield _this7.parseOptions(options); | ||
let parsedData = yield _this7.db().parseData(data, false, options.table); | ||
let parsedData = yield _this7.db().parseData(data, true, options.table); | ||
// check where condition | ||
@@ -546,0 +546,0 @@ if (helper.isEmpty(options.where)) { |
{ | ||
"name": "think-model", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "An adapter-based ORM for ThinkJS 3.x", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -403,6 +403,7 @@ const {test} = require('ava'); | ||
test('model update data', async t => { | ||
t.plan(4); | ||
t.plan(6); | ||
const model = new Model('post', {handle: class { | ||
parseData(data) { | ||
parseData(data, isUpdate) { | ||
t.true(isUpdate); | ||
return data; | ||
@@ -409,0 +410,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78128
2743