use of net.sf.jsqlparser.expression.UserVariable in project jans by JanssenProject.
the class SpannerFilterConverter method buildVariableExpression.
private Expression buildVariableExpression(TableMapping tableMapping, String attributeName, Object attribyteValue, Map<String, ValueWithStructField> queryParameters) throws SearchException {
StructField structField = getStructField(tableMapping, attributeName);
String usedAttributeName = attributeName;
int idx = 0;
while (queryParameters.containsKey(usedAttributeName) && (idx < 100)) {
usedAttributeName = attributeName + Integer.toString(idx++);
}
queryParameters.put(usedAttributeName, new ValueWithStructField(attribyteValue, structField));
return new UserVariable(usedAttributeName);
}
Aggregations