Skip to content

Instantly share code, notes, and snippets.

@idandagan1
Last active August 24, 2022 10:01
Show Gist options
  • Save idandagan1/d1e769d96b24d52f5eb5f85716e20388 to your computer and use it in GitHub Desktop.
Save idandagan1/d1e769d96b24d52f5eb5f85716e20388 to your computer and use it in GitHub Desktop.
String selectByIdAndSession = String.format("select * from customer where customer_id = %s and session = %s", customerId, session);
String selectBySession = String.format("select * from customer where session = %s", session);
if (enableNewQuery) {
return CustomerDao(selectByIdAndSession);
} else {
return CustomerDao(selectBySession);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment