Update of /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3005/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel
Modified Files:
I18NStrings.properties ResultTab.java
SQLResultExecuterPanel.java
Log Message:
Feature request 2826175:
Number of rows read is now visible on message panel and results tab.
Index: ResultTab.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/ResultTab.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** ResultTab.java 11 Aug 2007 17:20:17 -0000 1.24
--- ResultTab.java 1 Sep 2009 18:11:01 -0000 1.25
***************
*** 243,262 ****
final int maxRows =_exInfo.getMaxRows();
if (maxRows > 0 && rowCount >= maxRows)
{
! String buf = _sql.replaceAll("&", "&");
! buf = buf.replaceAll("<", "<");
! buf = buf.replaceAll("<", ">");
! buf = buf.replaceAll("\"", """);
! // i18n[ResultTab.limitMessage=Limited to <font color='red'> {0} </font> rows]
! String limitMsg =
! s_stringMgr.getString("ResultTab.limitMessage",
! Integer.valueOf(rowCount));
! _currentSqlLbl.setText("<html><pre> " + limitMsg +
! "; " + buf + "</pre></html>");
}
else
{
! _currentSqlLbl.setText(_sql);
}
--- 243,259 ----
final int maxRows =_exInfo.getMaxRows();
+ String escapedSql = escapeHtmlChars(_sql);
+
if (maxRows > 0 && rowCount >= maxRows)
{
! // i18n[ResultTab.limitMessage=Limited to <font color='red'> {0} </font> rows]
! String limitMsg = s_stringMgr.getString("ResultTab.limitMessage", Integer.valueOf(rowCount));
! _currentSqlLbl.setText("<html><pre> " + limitMsg + "; " + escapedSql + "</pre></html>");
}
else
{
! // i18n[ResultTab.rowsMessage=Rows {0}]
! String rowsMsg = s_stringMgr.getString("ResultTab.rowsMessage", Integer.valueOf(rowCount));
! _currentSqlLbl.setText("<html><pre> " + rowsMsg + "; " + escapedSql + "</pre></html>");
}
***************
*** 273,277 ****
}
! /**
* @see net.sourceforge.squirrel_sql.client.session.mainpanel.IResultTab#clear()
*/
--- 270,283 ----
}
! private String escapeHtmlChars(String sql)
! {
! String buf = sql.replaceAll("&", "&");
! buf = buf.replaceAll("<", "<");
! buf = buf.replaceAll("<", ">");
! buf = buf.replaceAll("\"", """);
! return buf;
! }
!
! /**
* @see net.sourceforge.squirrel_sql.client.session.mainpanel.IResultTab#clear()
*/
Index: SQLResultExecuterPanel.java
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/SQLResultExecuterPanel.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** SQLResultExecuterPanel.java 25 Dec 2008 19:09:30 -0000 1.46
--- SQLResultExecuterPanel.java 1 Sep 2009 18:11:01 -0000 1.47
***************
*** 1179,1184 ****
double outputLength = ((double)exInfo.getResultsProcessingElapsedMillis())/1000;
double totalLength = executionLength + outputLength;
! if (_largeScript) {
// Track the time in aggregate for the script.
_scriptQueryTime += executionLength;
--- 1179,1185 ----
double outputLength = ((double)exInfo.getResultsProcessingElapsedMillis())/1000;
double totalLength = executionLength + outputLength;
+ Integer numberResultRowsRead = exInfo.getNumberResultRowsRead();
! if (_largeScript) {
// Track the time in aggregate for the script.
_scriptQueryTime += executionLength;
***************
*** 1195,1200 ****
}
} else {
! printStatementExecTime(processedStatementCount,
statementCount,
executionLength,
outputLength,
--- 1196,1203 ----
}
} else {
! printStatementExecTime(
! processedStatementCount,
statementCount,
+ numberResultRowsRead,
executionLength,
outputLength,
***************
*** 1203,1207 ****
}
! private void printScriptExecDetails(int statementCount,
double executionLength,
double outputLength,
--- 1206,1210 ----
}
! private void printScriptExecDetails(int statementCount,
double executionLength,
double outputLength,
***************
*** 1240,1245 ****
}
! private void printStatementExecTime(int processedStatementCount,
int statementCount,
double executionLength,
double outputLength,
--- 1243,1250 ----
}
! private void printStatementExecTime(
! int processedStatementCount,
int statementCount,
+ Integer numberResultRowsRead,
double executionLength,
double outputLength,
***************
*** 1251,1254 ****
--- 1256,1260 ----
Integer.valueOf(processedStatementCount),
Integer.valueOf(statementCount),
+ numberResultRowsRead == null ? 0: numberResultRowsRead,
nbrFmt.format(totalLength),
nbrFmt.format(executionLength),
***************
*** 1343,1347 ****
DialectType dialectType =
DialectFactory.getDialectType(getSession().getMetaData());
! rsds.setResultSet(rs, dialectType);
addResultsTab(info, rsds, rsmdds, _cancelPanel, model, _resultTabToReplace);
--- 1349,1353 ----
DialectType dialectType =
DialectFactory.getDialectType(getSession().getMetaData());
! info.setNumberResultRowsRead(rsds.setResultSet(rs, dialectType));
addResultsTab(info, rsds, rsmdds, _cancelPanel, model, _resultTabToReplace);
Index: I18NStrings.properties
===================================================================
RCS file: /cvsroot/squirrel-sql/sql12/app/src/net/sourceforge/squirrel_sql/client/session/mainpanel/I18NStrings.properties,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** I18NStrings.properties 3 May 2007 21:27:39 -0000 1.13
--- I18NStrings.properties 1 Sep 2009 18:11:01 -0000 1.14
***************
*** 29,33 ****
SQLResultExecuterPanel.nosqlselected=No SQL selected for execution.
SQLResultExecuterPanel.outputStatus=Building output...
! SQLResultExecuterPanel.queryStatistics=Query {0} of {1} elapsed time (seconds) - Total: {2}, SQL query: {3}, Building output: {4}
SQLResultExecuterPanel.rowsDeleted={0} Row(s) Deleted
SQLResultExecuterPanel.rowsInserted={0} Row(s) Inserted
--- 29,33 ----
SQLResultExecuterPanel.nosqlselected=No SQL selected for execution.
SQLResultExecuterPanel.outputStatus=Building output...
! SQLResultExecuterPanel.queryStatistics=Query {0} of {1}, Rows read: {2}, Elapsed time (seconds) - Total: {3}, SQL query: {4}, Building output: {5}
SQLResultExecuterPanel.rowsDeleted={0} Row(s) Deleted
SQLResultExecuterPanel.rowsInserted={0} Row(s) Inserted
***************
*** 71,73 ****
PleaseWaitDialog.cancel=Cancel
PleaseWaitDialog.pleaseWait=Please wait while the query is executed
! PleaseWaitDialog.queryExecuting=Please wait
\ No newline at end of file
--- 71,75 ----
PleaseWaitDialog.cancel=Cancel
PleaseWaitDialog.pleaseWait=Please wait while the query is executed
! PleaseWaitDialog.queryExecuting=Please wait
!
! ResultTab.rowsMessage=Rows {0}
\ No newline at end of file
|