Class IgniteDbTransaction
Ignite database transaction.
public sealed class IgniteDbTransaction : DbTransaction, IDbTransaction, IDisposable, IAsyncDisposable
- Inheritance
-
IgniteDbTransaction
- Implements
- Inherited Members
Constructors
IgniteDbTransaction(ITransaction, IsolationLevel, DbConnection)
Initializes a new instance of the IgniteDbTransaction class.
public IgniteDbTransaction(ITransaction tx, IsolationLevel isolationLevel, DbConnection connection)
Parameters
txITransactionUnderlying Ignite transaction.
isolationLevelIsolationLevelIsolation level.
connectionDbConnectionConnection.
Properties
DbConnection
When overridden in a derived class, gets the DbConnection object associated with the transaction.
protected override DbConnection DbConnection { get; }
Property Value
- DbConnection
The DbConnection object associated with the transaction.
IgniteTransaction
Gets the underlying Ignite transaction.
public ITransaction IgniteTransaction { get; }
Property Value
IsolationLevel
When overridden in a derived class, gets the isolation level for this transaction.
public override IsolationLevel IsolationLevel { get; }
Property Value
- IsolationLevel
The isolation level for this transaction.
SupportsSavepoints
Gets a value that indicates whether this DbTransaction instance supports database savepoints. If false, the methods SaveAsync(string, CancellationToken), RollbackAsync(string, CancellationToken) and ReleaseAsync(string, CancellationToken) as well as their synchronous counterparts are expected to throw NotSupportedException.
public override bool SupportsSavepoints { get; }
Property Value
- bool
true if this DbTransaction instance supports database savepoints; otherwise, false.
Methods
Commit()
When overridden in a derived class, commits the database transaction.
public override void Commit()
CommitAsync(CancellationToken)
Asynchronously commits the database transaction.
public override Task CommitAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationTokenAn optional token to cancel the asynchronous operation. The default value is None.
Returns
Dispose(bool)
Releases the unmanaged resources used by the DbTransaction and optionally releases the managed resources.
protected override void Dispose(bool disposing)
Parameters
disposingboolIf true, this method releases all resources held by any managed objects that this DbTransaction references.
DisposeAsync()
Asynchronously diposes the transaction object.
public override ValueTask DisposeAsync()
Returns
Rollback()
When overridden in a derived class, rolls back a transaction from a pending state.
public override void Rollback()
RollbackAsync(string, CancellationToken)
Rolls back all commands that were executed after the specified savepoint was established.
public override Task RollbackAsync(string savepointName, CancellationToken cancellationToken = default)
Parameters
savepointNamestringThe name of the savepoint to roll back to.
cancellationTokenCancellationTokenAn optional token to cancel the asynchronous operation. The default value is None.
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.