Skip to content

Query branch reduction #62

@furious-luke

Description

@furious-luke

When performing multiple branched inserts, usually as a result of a custom mutation inserting an array of models, selections from each insert are often required. To support this a union of results from each branched insert is needed.

A new query operation, reduce, could be used to perform the union across all branches. Initially it would just concatenate results, but it could potentially be used to perform a function on each result. It would probably look something like:

query = (
    Q(Model)
    .insert(...).select(...)
    .insert(...).select(...)
    .reduce()
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions