Class SqlServerOperations
Database operations for for SQL servers up to and including version 7.
Inheritance
SqlServerOperations
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class SqlServerOperations : DatabaseOperations, IDatabaseOperations
Properties
NumShipoutThreads
The number of parallel threads that process the data chunks and write them to the database
Declaration
protected override int NumShipoutThreads { get; }
Property Value
Overrides
ShipoutBatchSize
The size of the batches that are queued for shipping out to the database
Declaration
protected override int ShipoutBatchSize { get; }
Property Value
Overrides
Methods
GetDatabaseSize()
Get the total database size (including any unallocated space inside the db, etc) in megabytes
Declaration
public override int GetDatabaseSize()
Returns
Overrides
GetDatabaseVersion()
Database operations for for SQL servers up to and including version 7.
Declaration
public override string GetDatabaseVersion()
Returns
Overrides
GetIdentityFromAutoIncrement(SoTable)
Obtain a new row ID for a tabel with database-specific autoincrement
Declaration
public override int GetIdentityFromAutoIncrement(SoTable soTable)
Parameters
Type |
Name |
Description |
SoTable |
soTable |
|
Returns
Overrides
GetKilobytes(SoTable)
Database operations for for SQL servers up to and including version 7.
Declaration
public override int GetKilobytes(SoTable table)
Parameters
Type |
Name |
Description |
SoTable |
table |
|
Returns
Overrides
GetRowCountAsync(SoTable, CancellationToken)
Get count of rows in the table (as quickly as possible). Not guaranteed to return exact results.
Declaration
public override Task<int> GetRowCountAsync(SoTable table, CancellationToken cancellationToken = default)
Parameters
Returns
Type |
Description |
Task<int> |
Approximate row count.
|
Overrides
InnerTruncateTableAsync(SoTable, TruncateOptions)
Throw away all the rows in a table. On most databases this is an operation that is very fast,
but it is not logged in the database transaction log and so cannot be rolled back.
It is also
not logged in the superoffice traveltransactionlog, so it is not replicated, and
should generally not be used on tables that are subject to replication.
Declaration
public override Task InnerTruncateTableAsync(SoTable table, TruncateOptions options = TruncateOptions.DeallocateStorage)
Parameters
Returns
Overrides
WriteBulkRowsAsync(BulkImportInfo, CancellationToken)
Actual bulk insert implementation
Declaration
protected override Task WriteBulkRowsAsync(DatabaseOperations.BulkImportInfo importInfo, CancellationToken cancellationToken)
Parameters
Returns
Overrides
Implements
Extension Methods