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

    Type Alias ConcurrencyStrategyFactory

    ConcurrencyStrategyFactory: (
        execute: (
            fn: (ctx: Store<any, any, any>) => void | Entity,
            options?: { intermediate?: boolean; userId?: number | string },
        ) => TransactionResult<unknown>,
        getTransaction: (
            name: string,
        ) =>
            | ((ctx: Store<any, any, any>, args: unknown) => void | Entity)
            | undefined,
    ) => ConcurrencyStrategy

    Factory that creates a ConcurrencyStrategy bound to the given execute and transaction-lookup functions. Called once per database at construction.

    execute is the observed database's execute — it applies a transaction, fires observers, and returns the mutation record.

    getTransaction looks up a registered transaction function by name, returning undefined when the name has not yet been registered via extend.

    Type declaration

      • (
            execute: (
                fn: (ctx: Store<any, any, any>) => void | Entity,
                options?: { intermediate?: boolean; userId?: number | string },
            ) => TransactionResult<unknown>,
            getTransaction: (
                name: string,
            ) =>
                | ((ctx: Store<any, any, any>, args: unknown) => void | Entity)
                | undefined,
        ): ConcurrencyStrategy
      • Parameters

        • execute: (
              fn: (ctx: Store<any, any, any>) => void | Entity,
              options?: { intermediate?: boolean; userId?: number | string },
          ) => TransactionResult<unknown>
        • getTransaction: (
              name: string,
          ) =>
              | ((ctx: Store<any, any, any>, args: unknown) => void | Entity)
              | undefined

        Returns ConcurrencyStrategy