Search Results for

    Show / Hide Table of Contents

    Interface IDatabaseTransaction

    Represents a transaction to be made with a database.

    Namespace: Venflow
    Assembly: Venflow.dll
    Syntax
    public interface IDatabaseTransaction : IAsyncDisposable, IDisposable

    Methods

    | Improve this Doc View Source

    Commit()

    Commits the database transaction.

    Declaration
    void Commit()
    | Improve this Doc View Source

    CommitAsync(CancellationToken)

    Commits the database transaction.

    Declaration
    Task CommitAsync(CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    An optional token to cancel the asynchronous operation.

    Returns
    Type Description
    Task
    | Improve this Doc View Source

    GetNpgsqlTransaction()

    Will return the underlying .

    Declaration
    NpgsqlTransaction GetNpgsqlTransaction()
    Returns
    Type Description
    NpgsqlTransaction

    The underlying

    Remarks

    Please do note, that if you call any of the Dispose methods on the instead of the IDatabaseTransaction ones, Venflow will never know about it being disposed. Therefore, always call one of the Dispose methods on the IDatabaseTransaction itself.

    | Improve this Doc View Source

    Release(String)

    Releases a transaction from a pending savepoint state.

    Declaration
    void Release(string name)
    Parameters
    Type Name Description
    String name

    The name of the savepoint.

    | Improve this Doc View Source

    ReleaseAsync(String, CancellationToken)

    Releases a transaction from a pending savepoint state.

    Declaration
    Task ReleaseAsync(string name, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    String name

    The name of the savepoint.

    CancellationToken cancellationToken

    An optional token to cancel the asynchronous operation.

    Returns
    Type Description
    Task
    | Improve this Doc View Source

    Rollback()

    Rolls back a transaction from a pending state.

    Declaration
    void Rollback()
    | Improve this Doc View Source

    Rollback(String)

    Rolls back a transaction from a pending savepoint state.

    Declaration
    void Rollback(string name)
    Parameters
    Type Name Description
    String name

    The name of the savepoint.

    | Improve this Doc View Source

    RollbackAsync(CancellationToken)

    Rolls back a transaction from a pending state.

    Declaration
    Task RollbackAsync(CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    CancellationToken cancellationToken

    An optional token to cancel the asynchronous operation.

    Returns
    Type Description
    Task
    | Improve this Doc View Source

    RollbackAsync(String, CancellationToken)

    Rolls back a transaction from a pending savepoint state.

    Declaration
    Task RollbackAsync(string name, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    String name

    The name of the savepoint.

    CancellationToken cancellationToken

    An optional token to cancel the asynchronous operation.

    Returns
    Type Description
    Task
    | Improve this Doc View Source

    Save(String)

    Creates a transaction save point.

    Declaration
    void Save(string name)
    Parameters
    Type Name Description
    String name

    The name of the savepoint.

    Remarks

    This method does not cause a database roundtrip to be made. The savepoint creation statement will instead be sent along with the next command.

    | Improve this Doc View Source

    SaveAsync(String, CancellationToken)

    Creates a transaction save point.

    Declaration
    Task SaveAsync(string name, CancellationToken cancellationToken = null)
    Parameters
    Type Name Description
    String name

    The name of the savepoint.

    CancellationToken cancellationToken

    An optional token to cancel the asynchronous operation.

    Returns
    Type Description
    Task
    Remarks

    This method does not cause a database roundtrip to be made, and will therefore always complete synchronously. The savepoint creation statement will instead be sent along with the next command.

    Theme

    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 Twenty