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

Method groupBy

lib/model.ts:522–525  ·  view source on GitHub ↗

Group rows by a given field. * * await Flight.groupBy('departure').all();

(this: T, field: string)

Source from the content-addressed store, hash-verified

520 * await Flight.groupBy('departure').all();
521 */
522 static groupBy<T extends ModelSchema>(this: T, field: string) {
523 this._currentQuery.groupBy(this.formatFieldToDatabase(field) as string);
524 return this;
525 }
526
527 /** Similar to `limit`, limit the number of results returned from the query.
528 *

Callers 1

translateToQueryMethod · 0.45

Calls 1

formatFieldToDatabaseMethod · 0.95

Tested by

no test coverage detected