Skip to content
This repository was archived by the owner on May 18, 2024. It is now read-only.
This repository was archived by the owner on May 18, 2024. It is now read-only.

Implement appJoin(), manual app join function #56

@samchon

Description

@samchon

The AppJoinBuilder supports automatic application level join with specializations of relationships.

However, the ApplicationBuilder does not support the manual app join who can specify an individual relationship.

It also does not support providing target records without any select query, either.

Therefore, implement a new appJoin() function who can support the manual app join function.

export function appJoin<
        Mine extends object, 
        Target extends object,
        Accessor extends SpecialFields<Mine, Relationship<Target>>>
    (
        mine: Mine[], 
        accessor: Accessor
    ): Promise<Target[]>;

export function appJoin<
        Mine extends object, 
        Target extends object,
        Accessor extends SpecialFields<Mine, Relationship<Target>>>
    (
        mine: Mine[], 
        accessor: Accessor, 
        target: Target[]
    ): Promise<Target[]>;

export function appJoin<
        Mine extends object, 
        Target extends object,
        Router extends object,
        Accessor extends SpecialFields<Mine, Has.ManyToMany<Target, Router>>>
    (
        mine: Mine[],
        accessor: Accessor,
        target: Target[],
        routers: Router[]
    ): Promise<Target[]>;

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions