@Override
 public AvaticaStatement createStatement(
     int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException {
   OptiqStatement statement =
       (OptiqStatement)
           super.createStatement(resultSetType, resultSetConcurrency, resultSetHoldability);
   server.addStatement(statement);
   return statement;
 }
 @Override
 public PreparedStatement prepareStatement(
     String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
     throws SQLException {
   try {
     AvaticaPrepareResult prepareResult = parseQuery(sql, new ContextImpl(this), -1);
     OptiqPreparedStatement statement =
         (OptiqPreparedStatement)
             factory.newPreparedStatement(
                 this, prepareResult, resultSetType, resultSetConcurrency, resultSetHoldability);
     server.addStatement(statement);
     return statement;
   } catch (RuntimeException e) {
     throw Helper.INSTANCE.createException("Error while preparing statement [" + sql + "]", e);
   } catch (Exception e) {
     throw Helper.INSTANCE.createException("Error while preparing statement [" + sql + "]", e);
   }
 }