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.
It would be nice to have a union/unionAll function that accepts collections of sub queries
Example usage:
Currently attempting create a unionAll of arbitrary number of sub-queries using
array.reduceetc. often results in difficult to debug type mismatches even if select args are exactly same.