C# Класс Rhino.Etl.Core.Operations.SqlBulkInsertOperation

Allows to execute an operation that perform a bulk insert into a sql server database
Наследование: Rhino.Etl.Core.Operations.AbstractDatabaseOperation
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Mappings string>.IDictionary

Открытые методы

Метод Описание
CreateInputSchema ( ) : void

Use the destination Schema and Mappings to create the operations input schema so it can build the adapter for sending to the WriteToServer method.

Execute ( IEnumerable rows ) : IEnumerable

Executes this operation

PrepareMapping ( ) : void

Prepares the mapping for use, by default, it uses the schema mapping. This is the preferred appraoch

Защищенные методы

Метод Описание
IsOptionOn ( SqlBulkCopyOptions option ) : bool

Returns true if the option is turned on, otherwise false

PrepareSchema ( ) : void

Prepares the schema of the target table

SqlBulkInsertOperation ( ConnectionStringSettings connectionStringSettings, string targetTable ) : System

Initializes a new instance of the SqlBulkInsertOperation class.

SqlBulkInsertOperation ( ConnectionStringSettings connectionStringSettings, string targetTable, int timeout ) : System

Initializes a new instance of the SqlBulkInsertOperation class.

SqlBulkInsertOperation ( string connectionStringName, string targetTable ) : System

Initializes a new instance of the SqlBulkInsertOperation class.

SqlBulkInsertOperation ( string connectionStringName, string targetTable, int timeout ) : System

Initializes a new instance of the SqlBulkInsertOperation class.

ToggleOption ( SqlBulkCopyOptions option, bool on ) : void

Turns a bulkCopyOptions on or off depending on the value of on

TurnOptionOff ( SqlBulkCopyOptions option ) : void

Turns the option off.

TurnOptionOn ( SqlBulkCopyOptions option ) : void

Turns the option on.

onSqlRowsCopied ( object sender, System.Data.SqlClient.SqlRowsCopiedEventArgs e ) : void

Handle sql notifications

Приватные методы

Метод Описание
CompareSqlColumns ( SqlConnection connection, SqlTransaction transaction, IEnumerable rows ) : void
CreateSqlBulkCopy ( SqlConnection connection, SqlTransaction transaction ) : System.Data.SqlClient.SqlBulkCopy

Creates the SQL bulk copy instance

GetFriendlyName ( Type type ) : string
TypesMatch ( Type schemaType, Type databaseType, bool isNullable ) : bool

Описание методов

CreateInputSchema() публичный Метод

Use the destination Schema and Mappings to create the operations input schema so it can build the adapter for sending to the WriteToServer method.
public CreateInputSchema ( ) : void
Результат void

Execute() публичный Метод

Executes this operation
public Execute ( IEnumerable rows ) : IEnumerable
rows IEnumerable
Результат IEnumerable

IsOptionOn() защищенный Метод

Returns true if the option is turned on, otherwise false
protected IsOptionOn ( SqlBulkCopyOptions option ) : bool
option SqlBulkCopyOptions The option to test for.
Результат bool

PrepareMapping() публичный Метод

Prepares the mapping for use, by default, it uses the schema mapping. This is the preferred appraoch
public PrepareMapping ( ) : void
Результат void

PrepareSchema() защищенный абстрактный Метод

Prepares the schema of the target table
protected abstract PrepareSchema ( ) : void
Результат void

SqlBulkInsertOperation() защищенный Метод

Initializes a new instance of the SqlBulkInsertOperation class.
protected SqlBulkInsertOperation ( ConnectionStringSettings connectionStringSettings, string targetTable ) : System
connectionStringSettings System.Configuration.ConnectionStringSettings Connection string settings to use.
targetTable string The target table.
Результат System

SqlBulkInsertOperation() защищенный Метод

Initializes a new instance of the SqlBulkInsertOperation class.
protected SqlBulkInsertOperation ( ConnectionStringSettings connectionStringSettings, string targetTable, int timeout ) : System
connectionStringSettings System.Configuration.ConnectionStringSettings Connection string settings to use.
targetTable string The target table.
timeout int The timeout.
Результат System

SqlBulkInsertOperation() защищенный Метод

Initializes a new instance of the SqlBulkInsertOperation class.
protected SqlBulkInsertOperation ( string connectionStringName, string targetTable ) : System
connectionStringName string Name of the connection string.
targetTable string The target table.
Результат System

SqlBulkInsertOperation() защищенный Метод

Initializes a new instance of the SqlBulkInsertOperation class.
protected SqlBulkInsertOperation ( string connectionStringName, string targetTable, int timeout ) : System
connectionStringName string Name of the connection string.
targetTable string The target table.
timeout int The timeout.
Результат System

ToggleOption() защищенный Метод

Turns a bulkCopyOptions on or off depending on the value of on
protected ToggleOption ( SqlBulkCopyOptions option, bool on ) : void
option SqlBulkCopyOptions The to turn on or off.
on bool true to set the on otherwise false to turn the off.
Результат void

TurnOptionOff() защищенный Метод

Turns the option off.
protected TurnOptionOff ( SqlBulkCopyOptions option ) : void
option SqlBulkCopyOptions
Результат void

TurnOptionOn() защищенный Метод

Turns the option on.
protected TurnOptionOn ( SqlBulkCopyOptions option ) : void
option SqlBulkCopyOptions
Результат void

onSqlRowsCopied() защищенный Метод

Handle sql notifications
protected onSqlRowsCopied ( object sender, System.Data.SqlClient.SqlRowsCopiedEventArgs e ) : void
sender object
e System.Data.SqlClient.SqlRowsCopiedEventArgs
Результат void

Описание свойств

Mappings публичное свойство

The mapping of columns from the row to the database schema. Important: The column name in the database is case sensitive!
public IDictionary Mappings
Результат string>.IDictionary