Interface IAdbTableCommandService
An optional service that executes predefined commands (table truncate, drop, delete rows, exists) on table-like objects. This simplifies executing these commands and assists with writing provider-independent database code, and is available as TableCommand. Also see HasTableCommandService, AdbTableInformation, AdbDataSourceInformation, AdbConnection and AdbProvider.
Implement this interface to customize the information for either a new .NET provider, or to tweak an existing one.
Namespace: actionETL.Adb
Assembly: actionETL.dll
Syntax
public interface IAdbTableCommandService
Remarks
Notes to implementers:
The AdbTableCommand class ensures any AdbTableIdentifier
or table name parameter is not null or only whitespace, so implementations of this
interface do not need to check this.
Note however that the schema and catalog parts can be null or whitespace.
Methods
DeleteRowsAsync(String)
Delete all rows in a table-like object (e.g. table or view).
Note that this method does not log errors. Instead the caller should normally log any returned failure status.
Declaration
Task<OutcomeStatusResult<int>> DeleteRowsAsync(string compositeTableName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | compositeTableName | Table to delete rows from. Can be a composite name. |
Returns
| Type | Description |
|---|---|
| Task<OutcomeStatusResult<Int32>> | On success, Status will be On failure, Status will have a failure status, and Result will be undefined.
An incorrect parameter will throw immediately. Any other exceptions or failures
will be caught and contained in the returned See the provider documentation for specific Open() exceptions. Some providers may throw if the connection is associated with a transaction. |
DropTableAsync(String, Boolean)
Drop a table.
Note that this method does not log errors. Instead the caller should normally log any returned failure status.
Declaration
Task<OutcomeStatus> DropTableAsync(string compositeTableName, bool ifExists)
Parameters
| Type | Name | Description |
|---|---|---|
| String | compositeTableName | Table to drop. Can be a composite name. |
| Boolean | ifExists | If |
Returns
| Type | Description |
|---|---|
| Task<OutcomeStatus> | An OutcomeStatus, with Succeeded on success; otherwise one of the failure states. |
DropViewAsync(String, Boolean)
Drop a view.
Note that this method does not log errors. Instead the caller should normally log any returned failure status.
Declaration
Task<OutcomeStatus> DropViewAsync(string compositeViewName, bool ifExists)
Parameters
| Type | Name | Description |
|---|---|---|
| String | compositeViewName | View to drop. Can be a composite name. |
| Boolean | ifExists | If |
Returns
| Type | Description |
|---|---|
| Task<OutcomeStatus> | An OutcomeStatus, with Succeeded on success; otherwise one of the failure states. |
TruncateTableAsync(String)
Truncates a table.
Note that this method does not log errors. Instead the caller should normally log any returned failure status.
Declaration
Task<OutcomeStatus> TruncateTableAsync(string compositeTableName)
Parameters
| Type | Name | Description |
|---|---|---|
| String | compositeTableName | Table to truncate. Can be a composite name. |
Returns
| Type | Description |
|---|---|
| Task<OutcomeStatus> | An OutcomeStatus, with Succeeded on success; otherwise one of the failure states. |