MCPcopy
hub / github.com/eveningkid/denodb / max

Method max

lib/model.ts:810–819  ·  view source on GitHub ↗

Find the maximum value of a field from all the selected records. * * await Flight.max("flightDuration");

(field: string)

Source from the content-addressed store, hash-verified

808 * await Flight.max("flightDuration");
809 */
810 static async max(field: string) {
811 const value = await this._runQuery(
812 this._currentQuery
813 .table(this.table)
814 .max(this.formatFieldToDatabase(field) as string)
815 .toDescription(),
816 );
817
818 return Number((value as AggregationResult[])[0].max);
819 }
820
821 /** Compute the sum of a field's values from all the selected records.
822 *

Callers 1

translateToQueryMethod · 0.45

Calls 4

_runQueryMethod · 0.95
formatFieldToDatabaseMethod · 0.95
toDescriptionMethod · 0.80
tableMethod · 0.80

Tested by

no test coverage detected