mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-02-25 00:31:49 +01:00
Fixed sqlite -> sqlite backup
This commit is contained in:
parent
62221b1582
commit
2c9f89eb50
@ -8,6 +8,7 @@ import org.apache.commons.dbcp2.BasicDataSource;
|
||||
import javax.sql.DataSource;
|
||||
import java.sql.Connection;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author Rsl1122
|
||||
@ -73,4 +74,19 @@ public class MySQLDB extends SQLDB {
|
||||
}
|
||||
super.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
if (!super.equals(o)) return false;
|
||||
MySQLDB mySQLDB = (MySQLDB) o;
|
||||
return Objects.equals(dataSource, mySQLDB.dataSource);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
||||
return Objects.hash(super.hashCode(), dataSource);
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import org.apache.commons.dbcp2.BasicDataSource;
|
||||
|
||||
import java.io.File;
|
||||
import java.sql.*;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author Rsl1122
|
||||
@ -136,4 +137,19 @@ public class SQLiteDB extends SQLDB {
|
||||
}
|
||||
super.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
if (!super.equals(o)) return false;
|
||||
SQLiteDB sqLiteDB = (SQLiteDB) o;
|
||||
return Objects.equals(dbName, sqLiteDB.dbName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
|
||||
return Objects.hash(super.hashCode(), dbName);
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ public class BatchOperationTable extends Table {
|
||||
copyPings(toDB);
|
||||
}
|
||||
|
||||
private void copyPings(BatchOperationTable toDB) {
|
||||
public void copyPings(BatchOperationTable toDB) {
|
||||
if (toDB.equals(this)) {
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user