mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-26 06:23:20 +08:00
Remove commented method and unused import.
This commit is contained in:
parent
b7ed76c79b
commit
5bf22ce8a2
@ -4,7 +4,6 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.mongodb.client.result.DeleteResult;
|
import com.mongodb.client.result.DeleteResult;
|
||||||
|
|
||||||
import dev.morphia.experimental.MorphiaSession;
|
|
||||||
import dev.morphia.query.FindOptions;
|
import dev.morphia.query.FindOptions;
|
||||||
import dev.morphia.query.Sort;
|
import dev.morphia.query.Sort;
|
||||||
import dev.morphia.query.experimental.filters.Filters;
|
import dev.morphia.query.experimental.filters.Filters;
|
||||||
@ -97,9 +96,6 @@ public final class DatabaseHelper {
|
|||||||
return DatabaseManager.getDatastore().find(Account.class).filter(Filters.eq("playerId", playerId)).first();
|
return DatabaseManager.getDatastore().find(Account.class).filter(Filters.eq("playerId", playerId)).first();
|
||||||
}
|
}
|
||||||
|
|
||||||
//public static boolean deleteAccount(String username) {
|
|
||||||
// return DatabaseManager.getDatastore().find(Account.class).filter(Filters.eq("username", username)).delete().getDeletedCount() > 0;
|
|
||||||
//}
|
|
||||||
public static void deleteAccount(Account target) {
|
public static void deleteAccount(Account target) {
|
||||||
// To delete an account, we need to also delete all the other documents in the database that reference the account.
|
// To delete an account, we need to also delete all the other documents in the database that reference the account.
|
||||||
// This should optimally be wrapped inside a transaction, to make sure an error thrown mid-way does not leave the
|
// This should optimally be wrapped inside a transaction, to make sure an error thrown mid-way does not leave the
|
||||||
|
Loading…
Reference in New Issue
Block a user