|
|
|
|
@ -363,23 +363,30 @@ namespace EntityFrameworkCore.Jet.Data
|
|
|
|
|
var command = (JetCommand) ((ICloneable) this).Clone();
|
|
|
|
|
command.CommandText = commandText;
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < usedParameterCount; i++)
|
|
|
|
|
if (_createProcedureExpression.IsMatch(command.CommandText))
|
|
|
|
|
{
|
|
|
|
|
command.Parameters.RemoveAt(0);
|
|
|
|
|
command.Parameters.Clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var parameterIndices = parser.GetStateIndices(
|
|
|
|
|
new[] {'@', '?'},
|
|
|
|
|
currentCommandStart,
|
|
|
|
|
commandDelimiter - currentCommandStart);
|
|
|
|
|
|
|
|
|
|
while (command.Parameters.Count > parameterIndices.Count)
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
command.Parameters.RemoveAt(parameterIndices.Count);
|
|
|
|
|
for (var i = 0; i < usedParameterCount && command.Parameters.Count > 0; i++)
|
|
|
|
|
{
|
|
|
|
|
command.Parameters.RemoveAt(0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var parameterIndices = parser.GetStateIndices(
|
|
|
|
|
new[] {'@', '?'},
|
|
|
|
|
currentCommandStart,
|
|
|
|
|
commandDelimiter - currentCommandStart);
|
|
|
|
|
|
|
|
|
|
while (command.Parameters.Count > parameterIndices.Count)
|
|
|
|
|
{
|
|
|
|
|
command.Parameters.RemoveAt(parameterIndices.Count);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
usedParameterCount += parameterIndices.Count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
usedParameterCount += parameterIndices.Count;
|
|
|
|
|
|
|
|
|
|
commands.Add(command);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|