Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feature/query-pattern' into feat…
Browse files Browse the repository at this point in the history
…ure/query-pattern
  • Loading branch information
nck-mlcnv committed Sep 13, 2024
2 parents e651e8d + 575e853 commit 1e93b95
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ private static List<String> instantiateTemplateQueries(QuerySource querySource,
final var match = matcher.group();
if (variables.containsKey(match)) continue;
String variableName = match.replaceAll("%%", "");
while (templateQueryString.contains("?" + variableName)) { // generate random variable name with 20 characters until it is unique
while (templateQueryString.contains("?" + variableName) || templateQueryString.contains("$" + variableName)) { // generate random variable name with 20 characters until it is unique
variableName = IntStream.range(0, 20).mapToObj(m -> String.valueOf(charset.charAt(random.nextInt(charset.length())))).collect(Collectors.joining());
}
final var variable = "?" + variableName;
Expand Down

0 comments on commit 1e93b95

Please sign in to comment.