Skip to content
Snippets Groups Projects
Commit fc9b3283 authored by brinn's avatar brinn
Browse files

Fix regex validation of custom SQL query: make '' around ${params} optional...

Fix regex validation of custom SQL query: make '' around ${params} optional and support providing type information to the magic ${key} parameters.

SVN: 28320
parent 523eeb76
No related branches found
No related tags found
No related merge requests found
......@@ -39,9 +39,9 @@ public class SQLQueryField extends MultilineVarcharField
private final static String EMPTY_TEXT_WITH_KEY_AND_TYPE = EMPTY_TEXT_WITH_KEY
+ " ... '${type}'";
private static final String TYPE_REGEX = "'\\$\\{type\\}'";
private static final String TYPE_REGEX = "\\$\\{type(::[^{}]+){0,1}\\}";
private static final String KEY_REGEX = "'\\$\\{key\\}'";
private static final String KEY_REGEX = "\\$\\{key(::[^{}]+){0,1}\\}";
private static final String ANY_REGEX = "(.|[\\n\\r])*";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment