Path: redb/redb.Core/Data/IRedbTransaction.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/IRedbTransaction.cs
----
using System;
using System.Threading.Tasks;
namespace redb.Core.Data
{
///
/// Database transaction abstraction for REDB.
/// Connection-scoped: all operations through parent connection
/// automatically participate in this transaction.
///
public interface IRedbTransaction : IAsyncDisposable
{
///
/// Transaction unique identifier (for diagnostics).
///
Guid TransactionId { get; }
///
/// Whether transaction is still active (not committed or rolled back).
///
bool IsActive { get; }
///
/// Transaction start time.
///
DateTimeOffset StartedAt { get; }
///
/// Commit all changes in transaction.
/// After commit, transaction becomes inactive.
///
Task CommitAsync();
///
/// Rollback all changes in transaction.
/// After rollback, transaction becomes inactive.
///
Task RollbackAsync();
}
}