DATACOUCH-526 - N1qlJoinResolver not escaping bucketNames with special characters (#291)

It escape the first bucket name, but not the second one.

Co-authored-by: mikereiche <michael.reiche@couchbase.com>
This commit is contained in:
Michael Reiche
2020-12-09 23:50:26 -08:00
committed by GitHub
parent 662a84bba6
commit 0494247cb1

View File

@@ -49,8 +49,8 @@ public class N1qlJoinResolver {
}
String useLKS = useLKSBuilder.length() > 0 ? "USE " + useLKSBuilder.toString() + " " : "";
String from = "FROM `" + template.getBucketName() + "` lks " + useLKS + joinType + " " + template.getBucketName()
+ " rks";
String from = "FROM `" + template.getBucketName() + "` lks " + useLKS + joinType + " `" + template.getBucketName()
+ "` rks";
String onLks = "lks." + template.getConverter().getTypeKey() + " = \""
+ parameters.getEntityTypeInfo().getType().getName() + "\"";
String onRks = "rks." + template.getConverter().getTypeKey() + " = \""