Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queries with keyword 'IN' #3

Closed
cast opened this issue May 5, 2011 · 0 comments
Closed

Queries with keyword 'IN' #3

cast opened this issue May 5, 2011 · 0 comments

Comments

@cast
Copy link
Contributor

cast commented May 5, 2011

The AppendIn method of the QueryImpl class does not append commas in between values.

The following code should fix that:

private void appendIn(StringBuilder sb, String field, List params) {
sb.append("").append(field).append("");
sb.append(" ");
sb.append("IN");
sb.append(" (");
boolean quoteParam = true;
for(int i = 0; i < params.size(); i++){
if(i != 0){
sb.append(",");
}
sb.append("'").append(params.get(i)).append("'");
}
sb.append(")");
}

@cast cast closed this as completed May 19, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant