fix(localdb): capture triggers survive consumer upserts (explicit ON CONFLICT upsert form, outer-statement override)
This commit is contained in:
@@ -190,11 +190,10 @@ public sealed class ConvergenceFixture : IAsyncDisposable
|
||||
|
||||
/// <summary>
|
||||
/// Inserts or updates one row through the normal consumer API (fires the ai/au capture triggers).
|
||||
/// Uses a plain UPDATE-else-INSERT inside one transaction — NOT <c>INSERT ... ON CONFLICT DO
|
||||
/// UPDATE</c>: that upsert form crashes the AFTER-UPDATE capture trigger with
|
||||
/// "UNIQUE constraint failed: __localdb_row_version" (see the Skipped regression test in
|
||||
/// BidirectionalConvergenceTests). The transaction makes the update-or-insert atomic against a
|
||||
/// concurrent replicated apply of the same pk (no INSERT/UNIQUE race on orders).
|
||||
/// Uses a plain UPDATE-else-INSERT inside one transaction; the transaction makes the
|
||||
/// update-or-insert atomic against a concurrent replicated apply of the same pk (no
|
||||
/// INSERT/UNIQUE race on orders). <c>INSERT ... ON CONFLICT DO UPDATE</c> is also supported by
|
||||
/// the capture triggers — covered by <c>Upsert_OnConflictDoUpdate_CapturesCorrectly</c>.
|
||||
/// </summary>
|
||||
public static async Task UpsertAsync(ILocalDb db, long id, string sku, long qty)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user