-
Notifications
You must be signed in to change notification settings - Fork 518
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new SQL hash calculation (#4737)
- Loading branch information
1 parent
c3a3c19
commit cb53a35
Showing
11 changed files
with
107 additions
and
79 deletions.
There are no files selected for viewing
17 changes: 0 additions & 17 deletions
17
src/Microsoft.Health.Fhir.SqlServer/Features/Search/ISqlQueryHashCalculator.cs
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
src/Microsoft.Health.Fhir.SqlServer/Features/Search/SqlQueryHashCalculator.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
test/Microsoft.Health.Fhir.Shared.Tests.Integration/Helpers/ReadableLogger.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
// ------------------------------------------------------------------------------------------------- | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License (MIT). See LICENSE in the repo root for license information. | ||
// ------------------------------------------------------------------------------------------------- | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Microsoft.Health.Fhir.Tests.Integration | ||
{ | ||
public class ReadableLogger<T> : ILogger<T> | ||
{ | ||
private List<string> _logs = new List<string>(); | ||
|
||
public IDisposable BeginScope<TState>(TState state) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public bool IsEnabled(LogLevel logLevel) | ||
{ | ||
throw new NotImplementedException(); | ||
} | ||
|
||
public void Log<TState>(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func<TState, Exception, string> formatter) | ||
{ | ||
_logs.Add(formatter(state, exception)); | ||
} | ||
|
||
public void LogError(string message) | ||
{ | ||
_logs.Add(message); | ||
} | ||
|
||
public void LogInformation(string message) | ||
{ | ||
_logs.Add(message); | ||
} | ||
|
||
public void LogWarning(string message) | ||
{ | ||
_logs.Add(message); | ||
} | ||
|
||
public bool TryGetLatestLog(string content, out string match) | ||
{ | ||
if (_logs.Any(l => l.Contains(content))) | ||
{ | ||
match = _logs.FindLast(l => l.Contains(content)); | ||
return true; | ||
} | ||
|
||
match = null; | ||
return false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
test/Microsoft.Health.Fhir.Shared.Tests.Integration/Persistence/TestSqlHashCalculator.cs
This file was deleted.
Oops, something went wrong.