Skip to content

Commit

Permalink
Fix issue with parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
sidhdirenge committed Sep 12, 2024
1 parent 1aaeed7 commit 564cdf6
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -465,18 +465,16 @@ private Statement getCountStatement(Collection<Range> ranges,

if (whereClause != null) {
builder.append(" WHERE " + whereClause);
parameters.forEach((name, value) -> builder.bind(name).to(value));
}
if (!filterIndexes.isEmpty()) {
if (whereClause != null) {
builder.append(" AND ");
} else {
builder.append(" WHERE ");
}
parameters = new HashMap<>();
builder.append(getIndexesFilterClause(filterIndexes, parameters));
parameters.forEach((name, value) -> builder.bind(name).to(value));
}
parameters.forEach((name, value) -> builder.bind(name).to(value));
LOG.trace("SQL statement: {}", builder.build().getSql());
return builder.build();
}
Expand Down

0 comments on commit 564cdf6

Please sign in to comment.