public long queryForCountStar(DatabaseConnection databaseConnection) throws SQLException {
  if (countStarQuery == null) {
    StringBuilder sb=new StringBuilder(64);
    sb.append("SELECT COUNT(*) FROM ");
    databaseType.appendEscapedEntityName(sb,tableInfo.getTableName());
    countStarQuery=sb.toString();
  }
  long count=databaseConnection.queryForLong(countStarQuery);
  logger.debug("query of '{}' returned {}",countStarQuery,count);
  return count;
}

public long queryForCountStar ( DatabaseConnection databaseConnection ) throws SQLException { if ( countStarQuery == null ) { StringBuilder sb = new StringBuilder ( 64 ) ; sb . append ( "SELECT COUNT(*) FROM " ) ; databaseType . appendEscapedEntityName ( sb , tableInfo . getTableName ( ) ) ; countStarQuery = sb . toString ( ) ; } long count = databaseConnection . queryForLong ( countStarQuery ) ; logger . debug ( "query of '{}' returned {}" , countStarQuery , count ) ; return count ; }
return a long value which is the number of rows in the table .
