Class BatchScriptExecutor

Namespace
DbExport.Providers
Assembly
DbExport.Api.dll

An implementation of the IScriptExecutor interface that executes SQL scripts using batch processing when supported by the database provider.

public class BatchScriptExecutor : IScriptExecutor
Inheritance
BatchScriptExecutor
Implements
Derived
Inherited Members

Remarks

This class processes scripts by splitting them into individual SQL statements and executing them as a batch if the provider permits it. If batch execution is not supported, individual commands are executed sequentially.

Constructors

BatchScriptExecutor(string)

An implementation of the IScriptExecutor interface that executes SQL scripts using batch processing when supported by the database provider.

public BatchScriptExecutor(string providerName)

Parameters

providerName string

The name of the database provider used to establish the connection.

Remarks

This class processes scripts by splitting them into individual SQL statements and executing them as a batch if the provider permits it. If batch execution is not supported, individual commands are executed sequentially.

Methods

Execute(string, string)

Executes a SQL script against the specified database connection.

public virtual void Execute(string connectionString, string script)

Parameters

connectionString string

The connection string used to connect to the database.

script string

The SQL script to be executed.