Skip to content

union/unionAll static functions  #77

@lorefnon

Description

@lorefnon

It would be nice to have a union/unionAll function that accepts collections of sub queries

Example usage:

const subQueries = input.blocks.map((block: BlockUpdateInput) => {
    return conn
        .selectFrom(tSomeTable)
        .select({ /* ... */ })
})

const query = unionAllOf(subQueries)

Currently attempting create a unionAll of arbitrary number of sub-queries using array.reduce etc. often results in difficult to debug type mismatches even if select args are exactly same.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions