📄 realinsertvtiresultsetstatistics.java
字号:
/* Derby - Class org.apache.derby.impl.sql.execute.rts.RealInsertVTIResultSetStatistics Copyright 2000, 2004 The Apache Software Foundation or its licensors, as applicable. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */package org.apache.derby.impl.sql.execute.rts;import org.apache.derby.iapi.services.io.StoredFormatIds;import org.apache.derby.iapi.services.i18n.MessageService;import org.apache.derby.iapi.reference.SQLState;import org.apache.derby.iapi.services.io.FormatableHashtable;import java.io.ObjectOutput;import java.io.ObjectInput;import java.io.IOException;/** ResultSetStatistics implemenation for InsertVTIResultSet. @author jerry*/public class RealInsertVTIResultSetStatistics extends RealNoRowsResultSetStatistics{ /* Leave these fields public for object inspectors */ public int rowCount; public boolean deferred; // CONSTRUCTORS /** * * */ public RealInsertVTIResultSetStatistics( int rowCount, boolean deferred, long executeTime, ResultSetStatistics sourceResultSetStatistics ) { super(executeTime, sourceResultSetStatistics); this.rowCount = rowCount; this.deferred = deferred; this.sourceResultSetStatistics = sourceResultSetStatistics; } // ResultSetStatistics interface /** * Return the statement execution plan as a String. * * @param depth Indentation level. * * @return String The statement execution plan as a String. */ public String getStatementExecutionPlanText(int depth) { initFormatInfo(depth); if (sourceResultSetStatistics == null) return ""; return indent + MessageService.getTextMessage( SQLState.RTS_INSERT_VTI_RESULT_SET) + ":\n" + indent + MessageService.getTextMessage(SQLState.RTS_DEFERRED) + ": " + deferred + "\n" + indent + MessageService.getTextMessage( SQLState.RTS_ROWS_INSERTED) + " = " + rowCount + "\n" + dumpTimeStats(indent) + ((sourceResultSetStatistics == null) ? "" : sourceResultSetStatistics.getStatementExecutionPlanText(1)); } /** * Return information on the scan nodes from the statement execution * plan as a String. * * @param depth Indentation level. * @param tableName if not NULL then print information for this table only * * @return String The information on the scan nodes from the * statement execution plan as a String. */ public String getScanStatisticsText(String tableName, int depth) { return sourceResultSetStatistics.getScanStatisticsText(tableName, depth); } // Class implementation public String toString() { return getStatementExecutionPlanText(0); } /** * Format for display, a name for this node. * */ public String getNodeName(){ return MessageService.getTextMessage(SQLState.RTS_INSERT_VTI); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -