postgrelize / AggregateOptions
Type Alias: AggregateOptions<T> ​
AggregateOptions<
T> =CountOptions<T> &Readonly<{dataType?:DataTypeInput;plain?:boolean; }>
Defined in: src/model/find-options.ts:173
Options of aggregate, max, min and sum.
Same as CountOptions plus plain.
Type Parameters ​
T ​
T = Values
See ​
Example ​
ts
const opts: AggregateOptions<Product> = { where: { active: true }, paranoid: false };
const highest = await Product.max('price', opts);