MCPcopy Create free account
hub / github.com/mikro-orm/mikro-orm / distinctOn

Method distinctOn

packages/sql/src/query/QueryBuilder.ts:852–856  ·  view source on GitHub ↗
(fields: unknown)

Source from the content-addressed store, hash-verified

850 fields: F,
851 ): SelectQueryBuilder<Entity, RootAlias, Hint, Context, RawAliases, Fields, CTEs>;
852 distinctOn(fields: unknown): SelectQueryBuilder<Entity, RootAlias, Hint, Context, RawAliases, Fields, CTEs> {
853 this.ensureNotFinalized();
854 this.#state.distinctOn = Utils.asArray(fields as string);
855 return this as SelectQueryBuilder<Entity, RootAlias, Hint, Context, RawAliases, Fields, CTEs>;
856 }
857
858 /**
859 * Creates an INSERT query with the given data.

Callers 3

getQueryBaseMethod · 0.45
GH6194.test.tsFile · 0.45

Calls 2

ensureNotFinalizedMethod · 0.95
asArrayMethod · 0.80

Tested by

no test coverage detected