public JdbcConnection prepareQuery(String preparedQueryString,StatementPreparer preparer,ResultSetConsumer resultConsumer) throws SQLException {
  Connection conn=connection();
  try (PreparedStatement statement=conn.prepareStatement(preparedQueryString)){
    preparer.accept(statement);
    try (ResultSet resultSet=statement.executeQuery()){
      if (resultConsumer != null)       resultConsumer.accept(resultSet);
    }
   }
   return this;
}

public JdbcConnection prepareQuery ( String preparedQueryString , StatementPreparer preparer , ResultSetConsumer resultConsumer ) throws SQLException { Connection conn = connection ( ) ; try ( PreparedStatement statement = conn . prepareStatement ( preparedQueryString ) ) { preparer . accept ( statement ) ; try ( ResultSet resultSet = statement . executeQuery ( ) ) { if ( resultConsumer != null ) resultConsumer . accept ( resultSet ) ; } } return this ; }
execute a sql prepared query .
