Skip to content

Instantly share code, notes, and snippets.

@sebersole
Created July 1, 2014 16:18
Show Gist options
  • Save sebersole/18abde1fc1ba222bdb77 to your computer and use it in GitHub Desktop.
Save sebersole/18abde1fc1ba222bdb77 to your computer and use it in GitHub Desktop.
Object[] parameterValues = ...;
Type[] parameterTypes = ...;
JdbcSession jdbcSession = ...;
jdbcSession.accept(
new PreparedStatementQueryOperationSpec() {
...
@Override
public ParameterBindings getParameterBindings() {
return new ParameterBindings() {
@Override
public void bindParameters(PreparedStatement stmnt) {
for ( int i = 0; i < parameterValues.length; i++ ) {
parameterTypes[i].nullSafeSet( stmnt, parameterValues[i], ..., session );
}
}
}
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment