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

Method union

packages/sql/src/query/QueryBuilder.ts:2767–2769  ·  view source on GitHub ↗

* Combines the current query with one or more other queries using `UNION` (with deduplication). * All queries must select the same columns. Returns a `QueryBuilder` that * can be used with `$in`, passed to `qb.from()`, or converted via `.getQuery()`, * `.getParams()`, `.toQuery()`, `.toRaw(

(...others: (QueryBuilder<any> | NativeQueryBuilder)[])

Source from the content-addressed store, hash-verified

2765 * ```
2766 */
2767 union(...others: (QueryBuilder<any> | NativeQueryBuilder)[]): QueryBuilder<Entity> {
2768 return this.buildUnionQuery('union', others);
2769 }
2770
2771 private buildUnionQuery(
2772 separator: 'union' | 'union all',

Callers 2

applyUnionWhereFunction · 0.80

Calls 1

buildUnionQueryMethod · 0.95

Tested by

no test coverage detected