Rename "limit" to "insertAtOnce" in InsertMediaAttachments.

This commit is contained in:
Andrew Mahone 2019-11-04 10:33:50 -05:00
parent c2d8f210b1
commit ad2101ce52

View File

@ -6218,13 +6218,13 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
private void InsertMediaAttachments(byte[] idBlob, List<MediaAttachment> attachments, IDatabaseConnection db)
{
var startIndex = 0;
var limit = 10;
var insertAtOnce = 10;
while (startIndex < attachments.Count)
{
var insertText = new StringBuilder(string.Format("insert into mediaattachments ({0}) values ", string.Join(",", _mediaAttachmentSaveColumns)));
var endIndex = Math.Min(attachments.Count, startIndex + limit);
var endIndex = Math.Min(attachments.Count, startIndex + insertAtOnce);
for (var i = startIndex; i < endIndex; i++)
{
@ -6266,7 +6266,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
statement.Reset();
statement.MoveNext();
}
startIndex += limit;
startIndex += insertAtOnce;
}
}