Member Junction
    Preparing search index...
    Index

    Constructors

    Accessors

    Methods

    • Begin a new transaction.

      Both SQL Server and PostgreSQL run in real transaction mode. The PG provider holds its active transaction on a single pg.PoolClient (_transaction), which serializes all queries on one connection — that historically caused deadlocks when push code did Promise.all(saves) because pg.Client queues concurrent queries and the queue could deadlock against non-DB async work (embedding compute, dialect conversion).

      The fix: parallel-save sites in the query-extraction sync pipeline now use RunMaybeSerial from @memberjunction/core, which detects an active provider transaction (via provider.IsInTransaction) and switches to sequential await execution. SQL Server preserves its original parallelism because IsInTransaction defaults to false on DatabaseProviderBase and the SQL Server provider doesn't override it.

      Parameters

      • Optionaloptions: TransactionOptions

      Returns Promise<void>

    • Execute a function within a transaction

      Type Parameters

      • T

      Parameters

      • fn: () => Promise<T>
      • Optionaloptions: TransactionOptions

      Returns Promise<T>