Removes the useNativeBulkInsert parameter, it's super old and useless
This commit is contained in:
@@ -4,6 +4,6 @@ namespace Umbraco.Core.Persistence
|
||||
{
|
||||
public interface IBulkSqlInsertProvider
|
||||
{
|
||||
int BulkInsertRecords<T>(IUmbracoDatabase database, IEnumerable<T> records, bool useNativeBulkInsert);
|
||||
int BulkInsertRecords<T>(IUmbracoDatabase database, IEnumerable<T> records);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@ namespace Umbraco.Core.Persistence
|
||||
|
||||
bool EnableSqlCount { get; set; }
|
||||
int SqlCount { get; }
|
||||
int BulkInsertRecords<T>(IEnumerable<T> records, bool useNativeBulkInsert = true);
|
||||
int BulkInsertRecords<T>(IEnumerable<T> records);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Umbraco.Core.Persistence
|
||||
{
|
||||
public class SqlServerBulkSqlInsertProvider : IBulkSqlInsertProvider
|
||||
{
|
||||
public int BulkInsertRecords<T>(IUmbracoDatabase database, IEnumerable<T> records, bool useNativeBulkInsert)
|
||||
public int BulkInsertRecords<T>(IUmbracoDatabase database, IEnumerable<T> records)
|
||||
{
|
||||
var recordsA = records.ToArray();
|
||||
if (recordsA.Length == 0) return 0;
|
||||
@@ -18,10 +18,9 @@ namespace Umbraco.Core.Persistence
|
||||
var pocoData = database.PocoDataFactory.ForType(typeof(T));
|
||||
if (pocoData == null) throw new InvalidOperationException("Could not find PocoData for " + typeof(T));
|
||||
|
||||
return useNativeBulkInsert && database.DatabaseType.IsSqlServer2008OrLater()
|
||||
return database.DatabaseType.IsSqlServer2008OrLater()
|
||||
? BulkInsertRecordsSqlServer(database, pocoData, recordsA)
|
||||
: BulkInsertRecordsWithCommands(database, recordsA);
|
||||
throw new NotSupportedException();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -162,9 +162,9 @@ namespace Umbraco.Core.Persistence
|
||||
/// </summary>
|
||||
public int SqlCount { get; private set; }
|
||||
|
||||
public int BulkInsertRecords<T>(IEnumerable<T> records, bool useNativeBulkInsert = true)
|
||||
public int BulkInsertRecords<T>(IEnumerable<T> records)
|
||||
{
|
||||
return _bulkSqlInsertProvider.BulkInsertRecords(this, records, useNativeBulkInsert);
|
||||
return _bulkSqlInsertProvider.BulkInsertRecords(this, records);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user