Search Results for

    Show / Hide Table of Contents

    Class AdbExecuteNonQueryTarget<TInputError>

    A dataflow worker with one Input port, that uses ExecuteNonQuery() to execute an SQL query for each incoming row. It also has an ErrorOutput port that receives any rows that throw an exception when creating and executing their queries.

    Note: Use the factory methods in AdbExecuteNonQueryTargetFactory to create instances of this class.

    It uses CreateSetParametersFromRowAction<T>(AdbParameterCollection) to set parameter values from incoming rows. The worker does not give access to the query return value or any output parameters.

    Also see SQL Database Access.

    Note: This worker does participate in any transaction currently active on the connection.

    Inheritance
    Object
    WorkerParent
    WorkerBase
    WorkerBase<AdbExecuteNonQueryTarget<TInputError>>
    AdbExecuteNonQueryTarget<TInputError>
    Implements
    IDisposeOnFinished
    Inherited Members
    WorkerBase<AdbExecuteNonQueryTarget<TInputError>>.AddCompletedCallback(Func<AdbExecuteNonQueryTarget<TInputError>, OutcomeStatus, Task<OutcomeStatus>>)
    WorkerBase<AdbExecuteNonQueryTarget<TInputError>>.AddRanCallback(Func<AdbExecuteNonQueryTarget<TInputError>, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
    WorkerBase<AdbExecuteNonQueryTarget<TInputError>>.AddStartingCallback(Func<AdbExecuteNonQueryTarget<TInputError>, Task<ProgressStatus>>)
    WorkerBase.AddCompletedCallback(Func<WorkerBase, OutcomeStatus, Task<OutcomeStatus>>)
    WorkerBase.AddRanCallback(Func<WorkerBase, OutcomeStatus, WorkerParentChildrenState, Task<OutcomeStatus>>)
    WorkerBase.AddStartingCallback(Func<WorkerBase, Task<ProgressStatus>>)
    WorkerBase.DefaultIsStartable()
    WorkerBase.ErroredPortErrorsWorkerProtected
    WorkerBase.ErrorOutputs
    WorkerBase.EscalateError
    WorkerBase.Inputs
    WorkerBase.IsStartable
    WorkerBase.Outputs
    WorkerBase.Parent
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, WorkerBase, WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(WorkerBase, TLastWorker)
    WorkerBase.SucceededSequence<TLastWorker>(TLastWorker)
    WorkerParent.AddChildCompletedCallback(Action<WorkerBase>)
    WorkerParent.AddStartingChildrenCallback(Func<WorkerParent, Task<ProgressStatus>>)
    WorkerParent.BytesPerRowBuffer
    WorkerParent.Children
    WorkerParent.DisposeOnFinished<TDisposable>(TDisposable)
    WorkerParent.GetDownstreamFactory<TInput>()
    WorkerParent.HasChildren
    WorkerParent.IsCanceled
    WorkerParent.IsCompleted
    WorkerParent.IsCreated
    WorkerParent.IsError
    WorkerParent.IsFailed
    WorkerParent.IsFatal
    WorkerParent.IsRunning
    WorkerParent.IsSucceeded
    WorkerParent.KeepChildrenLevels
    WorkerParent.Locator
    WorkerParent.LogFactory
    WorkerParent.Logger
    WorkerParent.MaxRunningChildren
    WorkerParent.Name
    WorkerParent.RemoveChildren()
    WorkerParent.RescheduleChildren()
    WorkerParent.RunChildrenAsync(Boolean)
    WorkerParent.RunChildrenAsync()
    WorkerParent.Status
    WorkerParent.Item[String]
    WorkerParent.ToString()
    WorkerParent.WorkerSystem
    WorkerParent.DebugCommands
    WorkerParent.AggregateErrorOutputRows
    WorkerParent.AggregateOutputRows
    WorkerParent.AggregateWorkersCompleted
    WorkerParent.InstantCompleted
    WorkerParent.InstantCreated
    WorkerParent.InstantStarted
    WorkerParent.RunningDuration
    Namespace: actionETL.Adb
    Assembly: actionETL.dll
    Syntax
    public class AdbExecuteNonQueryTarget<TInputError> : WorkerBase<AdbExecuteNonQueryTarget<TInputError>>, IDisposeOnFinished where TInputError : class
    Type Parameters
    Name Description
    TInputError

    The type of each Input and ErrorOutput row.

    Properties

    CommandBuilder

    Gets or sets the builder for the database command. Can only be set before the worker starts running.

    Note: This property is thread-safe.

    Declaration
    public AdbCommandBuilder CommandBuilder { get; set; }
    Property Value
    Type Description
    AdbCommandBuilder
    Exceptions
    Type Condition
    InvalidOperationException

    Cannot set the property after the worker has started running.

    ErrorOutput

    Gets the error output port for sending error rows to logging and an optional downstream worker.

    Declaration
    public ErrorOutputPort<TInputError> ErrorOutput { get; }
    Property Value
    Type Description
    ErrorOutputPort<TInputError>

    The error output port.

    Input

    Gets the input port for receiving rows from an upstream worker.

    Declaration
    public InputPort<TInputError> Input { get; }
    Property Value
    Type Description
    InputPort<TInputError>

    TransactionMaxBatches

    Gets or sets the maximum number of commands to group into an internal transaction. Can only be set before the worker starts running. Grouping short-running commands into a transaction improves performance. Only used if no command transaction has been set.

    Set to greater than 0 to get that number of maximum commands per transaction. Set to -1 to disable internal transaction grouping. Leave it at the default 0 to get the default number of maximum commands per transaction (usually 10).

    Note: This property is thread-safe.

    Declaration
    public int TransactionMaxBatches { get; set; }
    Property Value
    Type Description
    Int32

    The maximum number of internal transaction commands.

    Exceptions
    Type Condition
    InvalidOperationException

    Cannot set the property after the worker has started running.

    Methods

    RunAsync()

    This method can be overridden to add custom functionality to the derived worker that runs before and after the row processing. In this case, the base class base.RunAsync() must be called for the worker to function correctly.

    Typically, this worker is used without overriding this method.

    Declaration
    protected override async Task<OutcomeStatus> RunAsync()
    Returns
    Type Description
    Task<OutcomeStatus>

    A Task describing the success or failure of the worker. An asynchronous async implementation would e.g. return OutcomeStatus.Succeeded on success, while a synchronous implementation would return OutcomeStatus.SucceededTask.

    Overrides
    WorkerParent.RunAsync()

    Implements

    IDisposeOnFinished

    See Also

    AdbExecuteNonQueryTargetFactory
    AdbCommandBuilder
    In This Article
    Back to top Copyright © 2023 Envobi Ltd