/** * Counts the number of rows that are loaded from the database * * @throws Exception if the number of rows cannot be calculated * @return the entire number of rows */ private int getRowCount() throws Exception { String query = "SELECT COUNT(*) FROM " + endOfQuery(false); if (m_DataBaseConnection.execute(query) == false) { throw new Exception("Cannot count results tuples."); } ResultSet rs = m_DataBaseConnection.getResultSet(); rs.next(); int i = rs.getInt(1); rs.close(); return i; }
/** * Counts the number of rows that are loaded from the database * * @throws Exception if the number of rows cannot be calculated * @return the entire number of rows */ private int getRowCount() throws Exception { String query = "SELECT COUNT(*) FROM " + endOfQuery(false); if (m_DataBaseConnection.execute(query) == false) { throw new Exception("Cannot count results tuples."); } ResultSet rs = m_DataBaseConnection.getResultSet(); rs.next(); int i = rs.getInt(1); rs.close(); return i; }
String table = endOfQuery(true);
String table = endOfQuery(true);
if (!m_DataBaseConnection.tableExists(endOfQuery(true))) { throw new IOException( "Table does not exist according to metadata from JDBC driver. " String end = endOfQuery(false); ResultSet rs = m_DataBaseConnection.getResultSet(); m_structure = new Instances(endOfQuery(true), attribInfo, 0);
if (!m_DataBaseConnection.tableExists(endOfQuery(true))) { throw new IOException( "Table does not exist according to metadata from JDBC driver. " String end = endOfQuery(false); ResultSet rs = m_DataBaseConnection.getResultSet(); m_structure = new Instances(endOfQuery(true), attribInfo, 0);