Skip to content

Commit

Permalink
Oracle - Implementation of Batch Insertion
Browse files Browse the repository at this point in the history
A combination of the 6 "commits" of PR dotnet#10071

With the updated files from the branch dev!
  • Loading branch information
ralmsdeveloper committed Oct 14, 2017
1 parent 61952a4 commit b84df60
Show file tree
Hide file tree
Showing 15 changed files with 1,064 additions and 329 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -312,18 +312,7 @@ private DbCommand CreateCommand(
{
parameter.AddDbParameter(command, parameterValues);
}
}

// HACK: Need to make it easier to add this in update pipeline.
if (command.CommandText.Contains(":cur"))
{
command.Parameters.Add(
new OracleParameter(
"cur",
OracleDbType.RefCursor,
DBNull.Value,
ParameterDirection.Output));
}
}

return command;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

using System.Collections.Generic;
using System.Text;

namespace Microsoft.EntityFrameworkCore.Update.Internal
{
public interface IOracleUpdateSqlGenerator : IUpdateSqlGenerator
{
ResultSetMapping AppendBatchInsertOperation(
StringBuilder commandStringBuilder,
Dictionary<string, string> variablesInsert,
IReadOnlyList<ModificationCommand> modificationCommands,
int commandPosition,
ref int cursorPosition);

ResultSetMapping AppendBatchUpdateOperation(
StringBuilder commandStringBuilder,
StringBuilder variablesCommand,
IReadOnlyList<ModificationCommand> modificationCommands,
int commandPosition,
ref int cursorPosition);

ResultSetMapping AppendBatchDeleteOperation(
StringBuilder commandStringBuilder,
StringBuilder variablesCommand,
IReadOnlyList<ModificationCommand> modificationCommands,
int commandPosition,
ref int cursorPosition);
}
}
Loading

0 comments on commit b84df60

Please sign in to comment.