1 21 22 package org.apache.derby.impl.sql.execute.rts; 23 24 import org.apache.derby.iapi.services.i18n.MessageService; 25 import org.apache.derby.iapi.reference.SQLState; 26 27 33 public class RealDeleteVTIResultSetStatistics 34 extends RealNoRowsResultSetStatistics 35 { 36 37 38 public int rowCount; 39 40 42 46 public RealDeleteVTIResultSetStatistics( 47 int rowCount, 48 long executeTime, 49 ResultSetStatistics sourceResultSetStatistics 50 ) 51 { 52 super(executeTime, sourceResultSetStatistics); 53 this.rowCount = rowCount; 54 this.sourceResultSetStatistics = sourceResultSetStatistics; 55 } 56 57 59 66 public String getStatementExecutionPlanText(int depth) 67 { 68 initFormatInfo(depth); 69 70 71 return 72 indent + MessageService.getTextMessage(SQLState.RTS_DELETE_VTI_RESULT_SET) + 73 ":\n" + 74 indent + MessageService.getTextMessage( 75 SQLState.RTS_ROWS_DELETED) + 76 " = " + rowCount + "\n" + 77 dumpTimeStats(indent) + ((sourceResultSetStatistics == null) ? "" : 78 sourceResultSetStatistics.getStatementExecutionPlanText(1)); 79 } 80 81 91 public String getScanStatisticsText(String tableName, int depth) 92 { 93 if (sourceResultSetStatistics == null) 94 return ""; 95 return sourceResultSetStatistics.getScanStatisticsText(tableName, depth); 96 } 97 98 100 public String toString() 101 { 102 return getStatementExecutionPlanText(0); 103 } 104 108 public String getNodeName(){ 109 return MessageService.getTextMessage(SQLState.RTS_DELETE_VTI); 110 } 111 } 112 | Popular Tags |