Browse files

RavenDB-786 - Fix Index Replication Bundle -again

This is faster and safer. And tested.
  • Loading branch information...
1 parent 4fb9d4b commit a658253f59cc9bf937147ade6e59af0a4dc19ef5 @mj1856 mj1856 committed Dec 19, 2012
Showing with 14 additions and 1 deletion.
  1. +14 −1 Bundles/Raven.Bundles.IndexReplication/IndexReplicationIndexUpdateTrigger.cs
View
15 Bundles/Raven.Bundles.IndexReplication/IndexReplicationIndexUpdateTrigger.cs
@@ -182,7 +182,20 @@ public override void OnIndexEntryDeleted(string entryKey)
private string GetParameterName(string paramName)
{
- return GetParameterNameFromBuilder(_commandBuilder, paramName);
+ switch (_providerFactory.GetType().Name)
+ {
+ case "SqlClientFactory":
+ case "MySqlClientFactory":
+ return "@" + paramName;
+
+ case "OracleClientFactory":
+ case "NpgsqlFactory":
+ return ":" + paramName;
+
+ default:
+ // If we don't know, try to get it from the CommandBuilder.
+ return GetParameterNameFromBuilder(_commandBuilder, paramName);
+ }
}
public override void Dispose()

0 comments on commit a658253

Please sign in to comment.