Class AdbTableCommand
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 and AdbConnection.
Implements
Namespace: actionETL.Adb
Assembly: actionETL.dll
Syntax
public class AdbTableCommand : IAdbTableCommandService
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
public 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. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
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
public 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. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
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
public 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. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|
TruncateTableAsync(String)
Truncates a table.
Note that this method does not log errors. Instead the caller should normally log any returned failure status.
Declaration
public 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. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException |
|