@tugou/sequelize
Advanced tools
@@ -11,4 +11,10 @@ export declare class BaseModel { | ||
| destroy(options: object): Promise<any>; | ||
| findAll(options: object): any; | ||
| findAndCountAll(options: any): any; | ||
| findAll(options: object): Promise<any>; | ||
| findAndCountAll(options: any): Promise<false | { | ||
| current: any; | ||
| limit: any; | ||
| detail: any; | ||
| total: any; | ||
| last: number; | ||
| }>; | ||
| } |
@@ -75,3 +75,3 @@ "use strict"; | ||
| try { | ||
| const ret = await this.findAll(Object.assign({ raw: true }, options)); | ||
| const ret = await this.entity.findAll(Object.assign({ raw: true }, options)); | ||
| console.info('[sequelize] [findAll] ', JSON.stringify(ret)); | ||
@@ -89,3 +89,3 @@ // 如果没有值,默认返回空数组 [], ,改为返回: null | ||
| try { | ||
| const detail = await this.findAndCountAll(Object.assign({ | ||
| const detail = await this.entity.findAndCountAll(Object.assign({ | ||
| offset: (current - 1) * limit, | ||
@@ -92,0 +92,0 @@ limit |
+2
-2
| { | ||
| "name": "@tugou/sequelize", | ||
| "version": "1.0.14", | ||
| "version": "1.0.15", | ||
| "description": "midwayjs sequelize", | ||
@@ -29,3 +29,3 @@ "main": "dist/index", | ||
| "license": "MIT", | ||
| "gitHead": "5600d45b700a84026ca7f95a51c148de851bc947" | ||
| "gitHead": "17f9cc3e888e5eae579318dc255a323f6ed43b5e" | ||
| } |
10614
1.42%246
2.5%