MCPcopy Index your code
hub / github.com/TanStack/db / distinct

Method distinct

packages/db/src/query/builder/index.ts:783–788  ·  view source on GitHub ↗

* Specify that the query should return distinct rows. * Deduplicates rows based on the selected columns. * @returns A QueryBuilder with distinct enabled * * @example * ```ts * // Get countries our users are from * query * .from({ users: usersCollection }) * .select(({u

()

Source from the content-addressed store, hash-verified

781 * ```
782 */
783 distinct(): QueryBuilder<TContext> {
784 return new BaseQueryBuilder({
785 ...this.query,
786 distinct: true,
787 }) as any
788 }
789
790 /**
791 * Specify that the query should return a single result

Callers 2

createDistinctTestsFunction · 0.80
union-all.test.tsFile · 0.80

Calls

no outgoing calls

Tested by 1

createDistinctTestsFunction · 0.64