Class OracleOperations
Database operations for Oracle
Implements
Inherited Members
Namespace: SuperOffice.Data.Dialect
Assembly: SoDataBase.BusinessLogic.dll
Syntax
public class OracleOperations : DatabaseOperations, IDatabaseOperations
Methods
GetDatabaseSize()
Get the total database size (including any unallocated space inside the db, etc) in megabytes
Declaration
public override int GetDatabaseSize()
Returns
Type | Description |
---|---|
int |
Overrides
GetDatabaseVersion()
Database operations for Oracle
Declaration
public override string GetDatabaseVersion()
Returns
Type | Description |
---|---|
string |
Overrides
GetIdentityFromAutoIncrement(SoTable)
Obtain a new row ID for a table with database-specific autoincrement
Declaration
public override int GetIdentityFromAutoIncrement(SoTable soTable)
Parameters
Type | Name | Description |
---|---|---|
SoTable | soTable |
Returns
Type | Description |
---|---|
int |
Overrides
Remarks
Here on Oracle, we query the sequence object for the table for its next value; then we insert a dummy row to be compatible with the update-instead-of-insert logic
GetKilobytes(SoTable)
Database operations for Oracle
Declaration
public override int GetKilobytes(SoTable table)
Parameters
Type | Name | Description |
---|---|---|
SoTable | table |
Returns
Type | Description |
---|---|
int |
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
Type | Name | Description |
---|---|---|
SoTable | table | Table we want counts for |
CancellationToken | cancellationToken |
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
Type | Name | Description |
---|---|---|
SoTable | table | |
TruncateOptions | options |
Returns
Type | Description |
---|---|
Task |
Overrides
WriteBulkRowsAsync(BulkImportInfo, CancellationToken)
Write rows using the underlying database implementation's bulk import functionality.
Declaration
protected override Task WriteBulkRowsAsync(DatabaseOperations.BulkImportInfo importInfo, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
DatabaseOperations.BulkImportInfo | importInfo | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task |
Overrides
Remarks
Read more about the OracleBulkCopy class here: https://docs.oracle.com/en/database/oracle/oracle-database/19/odpnt/featBulkCopy.html