Skip to content

Commit

Permalink
added support for reserved columns
Browse files Browse the repository at this point in the history
  • Loading branch information
susanneschuster committed Nov 25, 2020
1 parent e05b610 commit df8ea75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -49,7 +49,7 @@ public void WriteEvent(LogEvent logEvent)
parameterList.Append(',');
}

fieldList.Append(field.Key);
fieldList.Append($"[{field.Key}]");
parameterList.Append("@P");
parameterList.Append(index);

Expand Down
Expand Up @@ -139,7 +139,7 @@ public void WriteEventCallsSqlCommandWrapperAddParameterForEachField()
public void WriteEventSetsSqlCommandWrapperCommandTextToSqlInsertWithCorrectFieldsAndValues()
{
// Arrange
var expectedSqlCommandText = $"INSERT INTO [{_schemaName}].[{_tableName}] (FieldName1,FieldName2,FieldNameThree) VALUES (@P0,@P1,@P2)";
var expectedSqlCommandText = $"INSERT INTO [{_schemaName}].[{_tableName}] ([FieldName1],[FieldName2],[FieldNameThree]) VALUES (@P0,@P1,@P2)";
var logEvent = TestLogEventHelper.CreateLogEvent();
var fieldsAndValues = new List<KeyValuePair<string, object>>
{
Expand Down

0 comments on commit df8ea75

Please sign in to comment.