Add support for MySQL backticks
This commit makes sure that content within backticks are skipped when parsing a SQL statement using NamedParameterUtils. This harmonizes the current behavior of ignoring special characters that are wrapped in backticks. Closes gh-31944
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
* Copyright 2002-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -44,12 +44,12 @@ public abstract class NamedParameterUtils {
|
||||
/**
|
||||
* Set of characters that qualify as comment or quotes starting characters.
|
||||
*/
|
||||
private static final String[] START_SKIP = new String[] {"'", "\"", "--", "/*"};
|
||||
private static final String[] START_SKIP = new String[] {"'", "\"", "--", "/*", "`"};
|
||||
|
||||
/**
|
||||
* Set of characters that at are the corresponding comment or quotes ending characters.
|
||||
*/
|
||||
private static final String[] STOP_SKIP = new String[] {"'", "\"", "\n", "*/"};
|
||||
private static final String[] STOP_SKIP = new String[] {"'", "\"", "\n", "*/", "`"};
|
||||
|
||||
/**
|
||||
* Set of characters that qualify as parameter separators,
|
||||
|
||||
Reference in New Issue
Block a user