Skip to content

Commit 360367c

Browse files
authored
add REVERT to CommandText checklist (#2048)
1 parent 8d2cb0c commit 360367c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Dapper/CompiledRegex.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ internal static partial class CompiledRegex
99
[StringSyntax("Regex")]
1010
#endif
1111
private const string
12-
WhitespaceOrReservedPattern = @"[\s;/\-+*]|^vacuum$|^commit$|^rollback$",
12+
WhitespaceOrReservedPattern = @"[\s;/\-+*]|^vacuum$|^commit$|^rollback$|^revert$",
1313
LegacyParameterPattern = @"(?<![\p{L}\p{N}@_])[?@:](?![\p{L}\p{N}@_])", // look for ? / @ / : *by itself* - see SupportLegacyParameterTokens
1414
LiteralTokensPattern = @"(?<![\p{L}\p{N}_])\{=([\p{L}\p{N}_]+)\}", // look for {=abc} to inject member abc as a literal
1515
PseudoPositionalPattern = @"\?([\p{L}_][\p{L}\p{N}_]*)\?"; // look for ?abc? for the purpose of subst back to ? using member abc

tests/Dapper.Tests/ProcedureTests.cs

+1
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,7 @@ public async Task Issue1986_AutoProc_Whitespace(string space)
333333
[InlineData("VACUUM;", CommandType.Text)]
334334
[InlineData("cOmmiT", CommandType.Text)]
335335
[InlineData("rOllbAck", CommandType.Text)]
336+
[InlineData("reVErt", CommandType.Text)]
336337

337338
// comments imply text
338339
[InlineData("foo--bar", CommandType.Text)]

0 commit comments

Comments
 (0)