@secondlayer/subgraphs 3.26.0 → 3.26.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -574,6 +574,26 @@ declare class SubgraphContext2 {
574
574
  * with the flush itself.
575
575
  */
576
576
  flush(): Promise<FlushManifest>;
577
+ /**
578
+ * Run a built statement list on an open transaction.
579
+ *
580
+ * Plain statements run in order. An increment runs UPDATE-first and then,
581
+ * ONLY if that matched nothing, the guarded INSERT — and if the INSERT also
582
+ * wrote nothing, the UPDATE again.
583
+ *
584
+ * That last step is the whole point. Under READ COMMITTED, two block
585
+ * transactions flushing the same key while the row is absent both see
586
+ * `UPDATE → 0 rows`; the first commits its INSERT, and the second's
587
+ * `WHERE NOT EXISTS` then sees that committed row and inserts nothing. No
588
+ * error, no constraint violation — the second delta was simply dropped.
589
+ * Re-running the UPDATE takes a fresh snapshot that DOES see the winner's
590
+ * row and applies the delta onto it.
591
+ *
592
+ * It cannot double-apply: the retry is reached only when the first UPDATE
593
+ * matched no row AND the INSERT wrote no row, so the delta has not been
594
+ * applied by either.
595
+ */
596
+ private execStatements;
577
597
  /** Prepare a single insert row, returning its data, columns, upsert key for batching. */
578
598
  private prepareInsert;
579
599
  /**