mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-01-27 10:31:42 +01:00
Removed Table#removeAllData
This commit is contained in:
parent
bdcba82735
commit
5e8cbf1a88
@ -101,13 +101,6 @@ public abstract class Table {
|
||||
return tableName;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all data from the table.
|
||||
*/
|
||||
public void removeAllData() {
|
||||
db.execute("DELETE FROM " + tableName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return tableName;
|
||||
|
@ -55,16 +55,11 @@ public class BatchOperationTable extends Table {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeAllData() {
|
||||
db.executeTransaction(new RemoveEverythingTransaction());
|
||||
}
|
||||
|
||||
public void copyEverything(BatchOperationTable toDB) {
|
||||
if (toDB.equals(this)) {
|
||||
return;
|
||||
}
|
||||
toDB.removeAllData();
|
||||
toDB.db.executeTransaction(new RemoveEverythingTransaction());
|
||||
|
||||
copyServers(toDB);
|
||||
copyUsers(toDB);
|
||||
|
@ -33,7 +33,6 @@ public class SQLBackupOps extends SQLOps implements BackupOperations {
|
||||
BatchOperationTable toDB = new BatchOperationTable((SQLDB) toDatabase);
|
||||
BatchOperationTable fromDB = new BatchOperationTable(db);
|
||||
|
||||
toDB.removeAllData();
|
||||
fromDB.copyEverything(toDB);
|
||||
} else {
|
||||
throw new IllegalArgumentException("Database was not a SQL database - backup not implemented.");
|
||||
|
Loading…
Reference in New Issue
Block a user