@ Override public RewrittenStatement rewrite ( final String sql , final Binding params , final StatementContext ctx ) { final ParsedStatement stmt = new ParsedStatement ( ) ; try { final String parsedSql = parseString ( sql , stmt , params ) ; return new MyRewrittenStatement ( parsedSql , stmt , ctx ) ; } catch ( IllegalArgumentException e ) { throw new UnableToCreateStatementException ( "Exception parsing for named parameter replacement" , e , ctx ) ; } }
Munge up the SQL as desired . Responsible for figuring out ow to bind any arguments in to the resultant prepared statement .