OptionalsqlLogger: SQLLoggerOptionalprovider: DatabaseProviderBasethe provider that owns the transaction. Pass it whenever the caller runs
work on a specific provider (an atomic mj sync push runs every save on it), so the
transaction and the work cannot end up on different instances. Defaults to the provider
initializeProvider() set up.
Use IsInTransaction.
Check if currently in a transaction.
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.
Optionaloptions: TransactionOptionsUse CommitTransaction.
Commit the current transaction.
Optionaloptions: TransactionOptionsUse ExecuteInTransaction.
Use RollbackTransaction.
Rollback the current transaction. Returns true if rollback succeeded or no transaction was active, false if rollback failed.
optional SQL logger