Skip to content

Commit

Permalink
fix missing param
Browse files Browse the repository at this point in the history
  • Loading branch information
rizen committed Apr 12, 2024
1 parent 81c3935 commit 8ea8352
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ving/record/VingRecord.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ export class VingKind {
* @param {Object} where A drizzle where clause
* @returns {number} A count of the records
*/
async sum(where) {
async sum(field, where) {
return (await this.db.select({ value: sum(this.table[field]) }).from(this.table).where(this.calcWhere(where)))[0].value;
}

Expand All @@ -680,7 +680,7 @@ export class VingKind {
* @param {Object} where A drizzle where clause
* @returns {number} A count of the records
*/
async avg(where) {
async avg(field, where) {
return (await this.db.select({ value: avg(this.table[field]) }).from(this.table).where(this.calcWhere(where)))[0].value;
}

Expand All @@ -693,7 +693,7 @@ export class VingKind {
* @param {Object} where A drizzle where clause
* @returns {number} A count of the records
*/
async min(where) {
async min(field, where) {
return (await this.db.select({ value: min(this.table[field]) }).from(this.table).where(this.calcWhere(where)))[0].value;
}

Expand All @@ -706,7 +706,7 @@ export class VingKind {
* @param {Object} where A drizzle where clause
* @returns {number} A count of the records
*/
async max(where) {
async max(field, where) {
return (await this.db.select({ value: max(this.table[field]) }).from(this.table).where(this.calcWhere(where)))[0].value;
}

Expand Down

0 comments on commit 8ea8352

Please sign in to comment.