Table of Contents

Class IgniteDbTransaction

Namespace
Apache.Ignite.Sql
Assembly
Apache.Ignite.dll

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

tx ITransaction

Underlying Ignite transaction.

isolationLevel IsolationLevel

Isolation level.

connection DbConnection

Connection.

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

ITransaction

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

cancellationToken CancellationToken

An optional token to cancel the asynchronous operation. The default value is None.

Returns

Task

A Task representing the asynchronous operation.

Dispose(bool)

Releases the unmanaged resources used by the DbTransaction and optionally releases the managed resources.

protected override void Dispose(bool disposing)

Parameters

disposing bool

If 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

ValueTask

A ValueTask representing the asynchronous operation.

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

savepointName string

The name of the savepoint to roll back to.

cancellationToken CancellationToken

An optional token to cancel the asynchronous operation. The default value is None.

Returns

Task

A Task representing the asynchronous operation.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.