think-model
Advanced tools
Comparing version 1.1.6 to 1.1.7
@@ -70,3 +70,3 @@ | ||
*/ | ||
join(join?: string | Array<string>): Model; | ||
join(join?: string | Array<string> | object): Model; | ||
/** | ||
@@ -73,0 +73,0 @@ * set order options |
@@ -33,3 +33,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"); }); }; } | ||
* get or set adapter | ||
* @param {Object} connection | ||
* @param {Object} connection | ||
*/ | ||
@@ -85,3 +85,3 @@ db(db) { | ||
* get model instance | ||
* @param {String} name | ||
* @param {String} name | ||
*/ | ||
@@ -400,3 +400,3 @@ model(name) { | ||
* parse options, reset this.options to {} | ||
* @param {Object} options | ||
* @param {Object} options | ||
*/ | ||
@@ -428,4 +428,4 @@ parseOptions(options) { | ||
* add data | ||
* @param {Object} data | ||
* @param {Object} options | ||
* @param {Object} data | ||
* @param {Object} options | ||
*/ | ||
@@ -787,3 +787,3 @@ add(data, options) { | ||
* quote field | ||
* @param {String} field | ||
* @param {String} field | ||
*/ | ||
@@ -879,4 +879,4 @@ [QUOTE_FIELD](field) { | ||
* set relation | ||
* @param {String} name | ||
* @param {Mixed} value | ||
* @param {String} name | ||
* @param {Mixed} value | ||
*/ | ||
@@ -883,0 +883,0 @@ setRelation(name, value) { |
@@ -8,5 +8,5 @@ const helper = require('think-helper'); | ||
* constructor | ||
* @param {Object|Array} data | ||
* @param {Object} options | ||
* @param {Object} model | ||
* @param {Object|Array} data | ||
* @param {Object} options | ||
* @param {Object} model | ||
*/ | ||
@@ -43,4 +43,4 @@ constructor(data, options, model) { | ||
* merge relation data to data | ||
* @param {Object} mapData | ||
* @param {Boolean} isArrMap | ||
* @param {Object} mapData | ||
* @param {Boolean} isArrMap | ||
*/ | ||
@@ -47,0 +47,0 @@ parseRelationData(mapData, isArrMap) { |
@@ -23,4 +23,4 @@ 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"); }); }; } | ||
* set relation | ||
* @param {Mixed} name | ||
* @param {Mixed} value | ||
* @param {Mixed} name | ||
* @param {Mixed} value | ||
*/ | ||
@@ -73,3 +73,3 @@ setRelation(name, value) { | ||
* get relation data | ||
* @param {Array|Object} data | ||
* @param {Array|Object} data | ||
*/ | ||
@@ -90,5 +90,5 @@ getRelation(data) { | ||
/** | ||
* | ||
* @param {String} relationKey | ||
* @param {Object|Array} data | ||
* | ||
* @param {String} relationKey | ||
* @param {Object|Array} data | ||
*/ | ||
@@ -122,3 +122,3 @@ parseItemRelation(relationKey, data) { | ||
if (helper.isFunction(itemFn)) { | ||
itemFn = itemFn(model, this.model); | ||
itemFn = itemFn.call(model, model, this.model); | ||
} | ||
@@ -125,0 +125,0 @@ if (itemFn !== undefined) { |
{ | ||
"name": "think-model", | ||
"version": "1.1.6", | ||
"version": "1.1.7", | ||
"description": "An adapter-based ORM for ThinkJS 3.x", | ||
@@ -32,16 +32,16 @@ "scripts": { | ||
"dependencies": { | ||
"think-cache": "^1.0.3", | ||
"think-cache": "^1.0.7", | ||
"think-debounce": "^1.0.3", | ||
"think-helper": "^1.0.5", | ||
"think-model-abstract": "^1.1.0", | ||
"think-mysql": "^1.0.2" | ||
"think-helper": "^1.0.22", | ||
"think-model-abstract": "^1.2.0", | ||
"think-mysql": "^1.1.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "^0.19.1", | ||
"babel-cli": "^6.24.1", | ||
"babel-core": "^6.24.1", | ||
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.0", | ||
"babel-eslint": "^7.2.3", | ||
"babel-preset-think-node": "^1.0.1", | ||
"eslint": "^4.2.0", | ||
"eslint-config-think": "^1.0.1", | ||
"eslint": "^4.11.0", | ||
"eslint-config-think": "^1.0.2", | ||
"muk": "^0.5.3", | ||
@@ -48,0 +48,0 @@ "nyc": "^10.3.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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
0
45529
14
1504
Updatedthink-cache@^1.0.7
Updatedthink-helper@^1.0.22
Updatedthink-model-abstract@^1.2.0
Updatedthink-mysql@^1.1.0