File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
test/DapperTests/IntegrationTests Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,16 @@ namespace DapperTests.IntegrationTests;
5
5
6
6
internal sealed class SqlTextAdapter ( DatabaseProvider databaseProvider )
7
7
{
8
+ #if NET6_0
9
+ private const RegexOptions Options = RegexOptions . Compiled | RegexOptions . CultureInvariant | RegexOptions . ExplicitCapture ;
10
+ #else
11
+ private const RegexOptions Options = RegexOptions . Compiled | RegexOptions . CultureInvariant | RegexOptions . ExplicitCapture | RegexOptions . NonBacktracking ;
12
+ #endif
13
+
8
14
private static readonly Dictionary < Regex , string > SqlServerReplacements = new ( )
9
15
{
10
- [ new Regex ( "\" ([^\" ]+)\" " , RegexOptions . Compiled ) ] = "[$+]" ,
11
- [ new Regex ( $@ "(VALUES \([^)]*\)){ Environment . NewLine } RETURNING \[Id\]", RegexOptions . Compiled ) ] = $ "OUTPUT INSERTED.[Id]{ Environment . NewLine } $1"
16
+ [ new Regex ( "\" ([^\" ]+)\" " , Options ) ] = "[$+]" ,
17
+ [ new Regex ( $@ "(VALUES \([^)]*\)){ Environment . NewLine } RETURNING \[Id\]", Options ) ] = $ "OUTPUT INSERTED.[Id]{ Environment . NewLine } $1"
12
18
} ;
13
19
14
20
private readonly DatabaseProvider _databaseProvider = databaseProvider ;
You can’t perform that action at this time.
0 commit comments