Skip to content

Commit

Permalink
Various database backend fixes. Full changelist below.
Browse files Browse the repository at this point in the history
 * References to SQLite removed.
 * SQLite database libraries no longer referenced.
 * Cleanse-by-number now runs properly on MySQL.
  • Loading branch information
N3X15 committed May 2, 2011
1 parent 7f730b7 commit 0a4a4a7
Show file tree
Hide file tree
Showing 8 changed files with 834 additions and 824 deletions.
772 changes: 386 additions & 386 deletions src/main/java/me/taylorkelly/bigbrother/BBSettings.java

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions src/main/java/me/taylorkelly/bigbrother/Cleanser.java
Expand Up @@ -129,10 +129,8 @@ private void cleanByNumber() {
stmt = conn.createStatement();
long start = System.currentTimeMillis() / 1000;

String[] stmts = BBDataTable.getInstance().getCleanseByLimit(Long.valueOf(BBSettings.maxRecords),
BBSettings.deletesPerCleansing).split(";");
for(String sql:stmts)
cleanedSoFarNumber = stmt.executeUpdate(sql);
BBDataTable.getInstance().getCleanseByLimit(stmt,Long.valueOf(BBSettings.maxRecords),
BBSettings.deletesPerCleansing);

String timespent = Time.formatDuration(System.currentTimeMillis() / 1000 - start);

Expand All @@ -158,7 +156,7 @@ private void cleanByNumber() {
}

} else {
String words = "SQLite can't cleanse by # of records.";
String words = "H2 can't cleanse by # of records.";
if (player == null) {
BBLogging.info(words);
} else {
Expand Down

0 comments on commit 0a4a4a7

Please sign in to comment.