/// <summary> /// /// </summary> /// <param name="list"></param> /// <param name="tableName"></param> /// <param name="sourceAlias"></param> /// <param name="targetAlias"></param> /// <param name="ext"></param> public Table(IEnumerable <T> list, string tableName, string sourceAlias, string targetAlias, BulkOperations ext) { _bulkCopyBatchSize = null; _bulkCopyNotifyAfter = null; _bulkCopyEnableStreaming = false; _helper = new BulkOperationsHelpers(); _tableName = tableName; _sourceAlias = sourceAlias; _targetAlias = targetAlias; _sqlTimeout = 600; _bulkCopyTimeout = 600; _ext = ext; _list = list; _schema = Constants.DefaultSchemaName; Columns = new HashSet <string>(); UpdateOnList = new List <string>(); DeleteOnList = new List <string>(); CustomColumnMappings = new Dictionary <string, string>(); _sqlBulkCopyOptions = SqlBulkCopyOptions.Default; }
/// <summary> /// /// </summary> /// <param name="list"></param> /// <param name="tableName"></param> /// <param name="columns"></param> /// <param name="schema"></param> /// <param name="sourceAlias"></param> /// <param name="targetAlias"></param> /// <param name="sqlTimeout"></param> /// <param name="bulkCopyTimeout"></param> /// <param name="bulkCopyEnableStreaming"></param> /// <param name="bulkCopyNotifyAfter"></param> /// <param name="bulkCopyBatchSize"></param> /// <param name="sqlBulkCopyOptions"></param> /// <param name="ext"></param> public AllColumnSelect(IEnumerable <T> list, string tableName, HashSet <string> columns, string schema, string sourceAlias, string targetAlias, int sqlTimeout, int bulkCopyTimeout, bool bulkCopyEnableStreaming, int?bulkCopyNotifyAfter, int?bulkCopyBatchSize, SqlBulkCopyOptions sqlBulkCopyOptions, BulkOperations ext) { _helper = new BulkOperationsHelpers(); _disableAllIndexes = false; _disableIndexList = new HashSet <string>(); _list = list; _columns = columns; _tableName = tableName; _schema = schema; _sourceAlias = sourceAlias; _targetAlias = targetAlias; _sqlTimeout = sqlTimeout; _bulkCopyTimeout = bulkCopyTimeout; _bulkCopyEnableStreaming = bulkCopyEnableStreaming; _bulkCopyNotifyAfter = bulkCopyNotifyAfter; _bulkCopyBatchSize = bulkCopyBatchSize; _sqlBulkCopyOptions = sqlBulkCopyOptions; _ext = ext; CustomColumnMappings = new Dictionary <string, string>(); }
/// <summary> /// /// </summary> /// <param name="list"></param> /// <param name="tableName"></param> /// <param name="schema"></param> /// <param name="columns"></param> /// <param name="disableIndexList"></param> /// <param name="disableAllIndexes"></param> /// <param name="sourceAlias"></param> /// <param name="targetAlias"></param> /// <param name="customColumnMappings"></param> /// <param name="bulkCopyTimeout"></param> /// <param name="bulkCopyEnableStreaming"></param> /// <param name="bulkCopyNotifyAfter"></param> /// <param name="bulkCopyBatchSize"></param> /// <param name="sqlBulkCopyOptions"></param> /// <param name="ext"></param> public BulkInsert(IEnumerable <T> list, string tableName, string schema, HashSet <string> columns, HashSet <string> disableIndexList, bool disableAllIndexes, string sourceAlias, string targetAlias, Dictionary <string, string> customColumnMappings, int bulkCopyTimeout, bool bulkCopyEnableStreaming, int?bulkCopyNotifyAfter, int?bulkCopyBatchSize, SqlBulkCopyOptions sqlBulkCopyOptions, BulkOperations ext) { _list = list; _tableName = tableName; _schema = schema; _columns = columns; _sourceAlias = sourceAlias; _targetAlias = targetAlias; _helper = new BulkOperationsHelpers(); _updateOnList = new List <string>(); _disableIndexList = disableIndexList; _disableAllIndexes = disableAllIndexes; _customColumnMappings = customColumnMappings; _bulkCopyTimeout = bulkCopyTimeout; _bulkCopyEnableStreaming = bulkCopyEnableStreaming; _bulkCopyNotifyAfter = bulkCopyNotifyAfter; _bulkCopyBatchSize = bulkCopyBatchSize; _ext = ext; _sqlBulkCopyOptions = sqlBulkCopyOptions; _ext.SetBulkExt(this); }
/// <summary> /// /// </summary> /// <param name="list"></param> /// <param name="sourceAlias"></param> /// <param name="targetAlias"></param> /// <param name="ext"></param> public CollectionSelect(IEnumerable <T> list, string sourceAlias, string targetAlias, BulkOperations ext) { _list = list; _sourceAlias = sourceAlias; _targetAlias = targetAlias; _ext = ext; }
/// <summary> /// /// </summary> /// <param name="sourceAlias"></param> /// <param name="targetAlias"></param> /// <param name="ext"></param> public Setup(string sourceAlias, string targetAlias, BulkOperations ext) { _sourceAlias = sourceAlias; _targetAlias = targetAlias; _ext = ext; }