Search Results for

    Show / Hide Table of Contents

    Class SqlDbClient

    Provides the database client class for SQL Server

    Inheritance
    System.Object
    DbClient
    SqlDbClient
    Implements
    System.IDisposable
    Inherited Members
    DbClient.Create(DbClientSettings)
    DbClient.ExecuteOperation(Operation, Nullable<Guid>)
    DbClient.Dispose()
    DbClient.BeginTransaction()
    DbClient.CommitTransaction()
    DbClient.RollbackTransaction()
    DbClient.TryCommitTransaction()
    DbClient.TryRollbackTransaction()
    DbClient.SetThreadCulture()
    DbClient.GetConnection()
    DbClient.CreateAndOpenConnection()
    DbClient.ReleaseConnection(Boolean)
    DbClient.GetConnectionString(DbClientSettings)
    DbClient.GetDataAdapter()
    DbClient.SplitAndExecuteCommandsInTransaction(DbCommand)
    DbClient.BeginTransactionInternal()
    DbClient.TryCommitTransactionInternal()
    DbClient.IgnoreExceptionDuringCyclicConstraintHandling(Exception)
    DbClient.TryRollbackTransactionInternal()
    DbClient.AddSqlParameters(IEnumerable<QueryParameter>, DbCommand)
    DbClient.GetLastUpdateVersionsOfEntities(String[])
    DbClient.TenantSchema
    DbClient.DatabaseConnectionMode
    DbClient.TransactionCount
    DbClient.ConnectionName
    DbClient.BlobEncryptionKey
    DbClient.UserAccountId
    DbClient.RetryStrategy
    DbClient.CurrentTransaction
    DbClient.SkipBlobGarbageCollection
    DbClient.DbConnectionLockObject
    DbClient.BlobGarbageCleanupFinished
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: TimeCockpit.Data.Database
    Assembly: TimeCockpit.Data.dll
    Syntax
    public sealed class SqlDbClient : DbClient, IDisposable

    Properties

    SupportsNoCheckConstraint

    Gets a value indicating whether this db client supports disabling constraints.

    Declaration
    public override bool SupportsNoCheckConstraint { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    DbClient.SupportsNoCheckConstraint

    SupportsTableValuedParameters

    Gets a value indicating whether this db client supports TVPs.

    Declaration
    public override bool SupportsTableValuedParameters { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    DbClient.SupportsTableValuedParameters

    Methods

    DeleteBlobGarbage(DbConnection, IEnumerable<BlobGarbageRow>)

    Deletes rows from the blob garbage collection

    Declaration
    protected override void DeleteBlobGarbage(DbConnection conn, IEnumerable<BlobGarbageRow> blobGarbageCollection)
    Parameters
    Type Name Description
    System.Data.Common.DbConnection conn

    Database connection used to access the database

    System.Collections.Generic.IEnumerable<BlobGarbageRow> blobGarbageCollection

    Guids of the blob that should be deleted

    Overrides
    DbClient.DeleteBlobGarbage(DbConnection, IEnumerable<BlobGarbageRow>)

    ExecuteDatabaseOperation(Func<DbConnection, UInt64, DbCommand>, Boolean)

    Executes a database operation.

    Declaration
    [CLSCompliant(false)]
    protected override ulong ExecuteDatabaseOperation(Func<DbConnection, ulong, DbCommand> commandCreator, bool syncContent)
    Parameters
    Type Name Description
    System.Func<System.Data.Common.DbConnection, System.UInt64, System.Data.Common.DbCommand> commandCreator

    Function that is used to create the database command object.

    System.Boolean syncContent

    Indicates how and if the ModelElement that is targeted is synced.

    Returns
    Type Description
    System.UInt64

    Version of the database operation

    Overrides
    DbClient.ExecuteDatabaseOperation(Func<DbConnection, UInt64, DbCommand>, Boolean)

    FindOrCreateCommand(String, DbConnection)

    Create DB command by looking it up in a cache of prepared commands or creating it.

    Declaration
    protected override DbCommand FindOrCreateCommand(string sqlText, DbConnection connection)
    Parameters
    Type Name Description
    System.String sqlText

    The SQL command text; always a SELECT statement.

    System.Data.Common.DbConnection connection

    The database connection on which the command will be executed.

    Returns
    Type Description
    System.Data.Common.DbCommand

    DB command from the cache or newly created command.

    Overrides
    DbClient.FindOrCreateCommand(String, DbConnection)
    Remarks

    Command caching for SQL server is disabled.

    FinishCommand(DbCommand)

    Called after DbClient is done with the command.

    Declaration
    protected override void FinishCommand(DbCommand command)
    Parameters
    Type Name Description
    System.Data.Common.DbCommand command

    A command previously returned by FindOrCreateCommand(String, DbConnection).

    Overrides
    DbClient.FinishCommand(DbCommand)
    Remarks

    The SQL Server does not cache commands -> command is immediately disposed.

    OpenConnectionAsync(CancellationToken)

    Opens a new connection.

    Declaration
    protected override Task<DbConnection> OpenConnectionAsync(CancellationToken cancellationToken)
    Parameters
    Type Name Description
    System.Threading.CancellationToken cancellationToken

    The cancellation token.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Data.Common.DbConnection>

    Returns the newly opened connection.

    Overrides
    DbClient.OpenConnectionAsync(CancellationToken)
    In This Article
    Back to top Copyright © 2020 software architects gmbh