function resetAggregates
resetAggregates<T extends string>(
table: string,
entityId: InValue,
fields: readonly T[],
resetSql: Record<T, string>,
): Promise<void>

Reset selected aggregate columns from trusted SQL expressions. Each expression must use the entity id as its only placeholder.

Type Parameters

T extends string

Parameters

table: string
entityId: InValue
fields: readonly T[]
resetSql: Record<T, string>

Return Type

Promise<void>

Usage

import { resetAggregates } from "docs/database.ts";