🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@tugou/sequelize

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tugou/sequelize - npm Package Compare versions

Comparing version
1.0.15
to
1.1.0
+2
-0
dist/model/base.d.ts

@@ -9,4 +9,6 @@ export declare class BaseModel {

create(values: object, options?: object): Promise<any>;
bulkCreate(values: object, options?: object): Promise<any>;
update(values: object, options?: object): Promise<any>;
destroy(options: object): Promise<any>;
count(options: object): Promise<any>;
findAll(options: object): Promise<any>;

@@ -13,0 +15,0 @@ findAndCountAll(options: any): Promise<false | {

@@ -50,2 +50,14 @@ "use strict";

}
async bulkCreate(values, options = {}) {
try {
let ret = await this.entity.bulkCreate(values, options);
console.info('[sequelize] [bulkCreate] ', JSON.stringify(ret));
// 返回创建好的 Json
return ret;
}
catch (e) {
console.error('[sequelize] [bulkCreate] ', e);
return false;
}
}
async update(values, options = {}) {

@@ -74,2 +86,13 @@ try {

}
async count(options) {
try {
const ret = await this.entity.count(options);
console.info('[sequelize] [count] ', ret);
return ret;
}
catch (e) {
console.error('[sequelize] [count] ', e);
return false;
}
}
async findAll(options) {

@@ -76,0 +99,0 @@ try {

+2
-2
{
"name": "@tugou/sequelize",
"version": "1.0.15",
"version": "1.1.0",
"description": "midwayjs sequelize",

@@ -29,3 +29,3 @@ "main": "dist/index",

"license": "MIT",
"gitHead": "17f9cc3e888e5eae579318dc255a323f6ed43b5e"
"gitHead": "eac86d7b86242f60e6d6db9bea043b7961ff947e"
}