Path: redb/redb.Core/Data/TransactionWrites.cs
Snapshot: redb, development snapshot 2026-12-06. This is the development state of the public mirrors; it may differ from the published packages.
License: Apache-2.0. Repository: https://github.com/redbase-app/redb
Page: https://redbase.app/src/dev-2026-12-06/redb/redb.Core/Data/TransactionWrites.cs
----
using System;
using System.Runtime.CompilerServices;
namespace redb.Core.Data
{
///
/// Whether a transaction has written anything yet. Inside a transaction that has written nothing, what its
/// connection reads is committed state, so a shared instance may keep it (the lazy-load rule, owner decision
/// 2026-09-17); once the transaction has written, what it reads may be its own uncommitted work, and a shared
/// instance keeps nothing of it (owner decision 2026-09-15). redb writes in few known places, which mark
/// here: every non-query command and every bulk operation (), and the provider
/// methods that write behind a query (soft delete, purge). Kept per transaction object, weakly.
///
public static class TransactionWrites
{
private static readonly ConditionalWeakTable