1 21 22 package org.apache.derby.impl.sql.execute.rts; 23 24 import org.apache.derby.iapi.services.io.StoredFormatIds; 25 26 import org.apache.derby.iapi.services.i18n.MessageService; 27 import org.apache.derby.iapi.reference.SQLState; 28 29 import org.apache.derby.iapi.services.io.FormatableHashtable; 30 31 import java.io.ObjectOutput ; 32 import java.io.ObjectInput ; 33 import java.io.IOException ; 34 35 41 public class RealInsertVTIResultSetStatistics 42 extends RealNoRowsResultSetStatistics 43 { 44 45 46 public int rowCount; 47 public boolean deferred; 48 49 51 55 public RealInsertVTIResultSetStatistics( 56 int rowCount, 57 boolean deferred, 58 long executeTime, 59 ResultSetStatistics sourceResultSetStatistics 60 ) 61 { 62 super(executeTime, sourceResultSetStatistics); 63 this.rowCount = rowCount; 64 this.deferred = deferred; 65 this.sourceResultSetStatistics = sourceResultSetStatistics; 66 } 67 68 70 77 public String getStatementExecutionPlanText(int depth) 78 { 79 initFormatInfo(depth); 80 81 if (sourceResultSetStatistics == null) 82 return ""; 83 84 return 85 indent + MessageService.getTextMessage( 86 SQLState.RTS_INSERT_VTI_RESULT_SET) + 87 ":\n" + 88 indent + MessageService.getTextMessage(SQLState.RTS_DEFERRED) + 89 ": " + deferred + "\n" + 90 indent + MessageService.getTextMessage( 91 SQLState.RTS_ROWS_INSERTED) + 92 " = " + rowCount + "\n" + 93 dumpTimeStats(indent) + ((sourceResultSetStatistics == null) ? "" : 94 sourceResultSetStatistics.getStatementExecutionPlanText(1)); 95 } 96 97 107 public String getScanStatisticsText(String tableName, int depth) 108 { 109 return sourceResultSetStatistics.getScanStatisticsText(tableName, depth); 110 } 111 112 114 public String toString() 115 { 116 return getStatementExecutionPlanText(0); 117 } 118 122 public String getNodeName(){ 123 return MessageService.getTextMessage(SQLState.RTS_INSERT_VTI); 124 } 125 } 126 | Popular Tags |