add REVERT to CommandText checklist (#2048)

This commit is contained in:
Marc Gravell
2024-03-06 14:59:19 +00:00
committed by GitHub
parent 8d2cb0cf35
commit 360367ca54
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ internal static partial class CompiledRegex
[StringSyntax("Regex")]
#endif
private const string
WhitespaceOrReservedPattern = @"[\s;/\-+*]|^vacuum$|^commit$|^rollback$",
WhitespaceOrReservedPattern = @"[\s;/\-+*]|^vacuum$|^commit$|^rollback$|^revert$",
LegacyParameterPattern = @"(?<![\p{L}\p{N}@_])[?@:](?![\p{L}\p{N}@_])", // look for ? / @ / : *by itself* - see SupportLegacyParameterTokens
LiteralTokensPattern = @"(?<![\p{L}\p{N}_])\{=([\p{L}\p{N}_]+)\}", // look for {=abc} to inject member abc as a literal
PseudoPositionalPattern = @"\?([\p{L}_][\p{L}\p{N}_]*)\?"; // look for ?abc? for the purpose of subst back to ? using member abc
+1
View File
@@ -333,6 +333,7 @@ namespace Dapper.Tests
[InlineData("VACUUM;", CommandType.Text)]
[InlineData("cOmmiT", CommandType.Text)]
[InlineData("rOllbAck", CommandType.Text)]
[InlineData("reVErt", CommandType.Text)]
// comments imply text
[InlineData("foo--bar", CommandType.Text)]