mirror of
https://github.com/DapperLib/Dapper.git
synced 2026-10-17 05:12:13 +08:00
add REVERT to CommandText checklist (#2048)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user