@adobe/data - v0.10.30
    Preparing search index...

    Interface Router<C, DK>

    Write-only handle over a family of archetypes that share a component set but differ by the value of one or more partition components. insert reads the partition value(s) from the row, resolves (creating on first use) the concrete child archetype for that value, and inserts there.

    A family has no single dense column view, so — unlike Archetype — a Router exposes no columns, rowCount, or iteration. Read a family through queryArchetypes (optionally filtered by partition value), or narrow to one concrete member by supplying the value to ensureArchetype.

    insert is deliberately signature-identical to Archetype.insert: a discriminated Archetype<C> | Archetype.Router<C> (produced when the requested keys are not statically known to include/exclude a partition component) therefore still permits .insert with no narrowing — only dense column access requires having resolved to a concrete Archetype.

    interface Router<C = {}, DK extends keyof C = never> {
        components: ComponentSet<Extract<keyof C, string>>;
        insert: <
            T extends
                | Omit<C, "id">
                | Omit<C, "id" | DK> & Partial<
                    Pick<C, Exclude<Extract<DK, keyof C>, "id">>,
                >
                | {
                    [K in string | number | symbol]: (
                        Omit<C, "id" | DK> & Partial<
                            Pick<C, Exclude<Extract<DK, keyof C>, "id">>,
                        >
                    )[K]
                },
        >(
            rowData: Exact<EntityInsertValues<C, DK>, T>,
        ) => number;
    }

    Type Parameters

    • C = {}
    • DK extends keyof C = never
    Index

    Properties

    Properties

    components: ComponentSet<Extract<keyof C, string>>
    insert: <
        T extends
            | Omit<C, "id">
            | Omit<C, "id" | DK> & Partial<
                Pick<C, Exclude<Extract<DK, keyof C>, "id">>,
            >
            | {
                [K in string | number | symbol]: (
                    Omit<C, "id" | DK> & Partial<
                        Pick<C, Exclude<Extract<DK, keyof C>, "id">>,
                    >
                )[K]
            },
    >(
        rowData: Exact<EntityInsertValues<C, DK>, T>,
    ) => number