private boolean query ( ) throws SQLException { statement = this . connection . createStatement ( ) ; String query = "SELECT PrimaryKey, RevisionCounter," + " RevisionID, ArticleID, Timestamp, FullRevisionID " + "FROM revisions" ; if ( primaryKey > 0 ) { query += " WHERE PrimaryKey > " + primaryKey ; } if ( MAX_NUMBER_RESULTS > 0 ) { query += " LIMIT " + MAX_NUMBER_RESULTS ; } result = statement . executeQuery ( query ) ; return result . next ( ) ; }
Queries the database for more revision information .