Package emu.grasscutter.database
Class DatabaseHelper
java.lang.Object
emu.grasscutter.database.DatabaseHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckPlayerExists(int id) static AccountcreateAccount(String username) static AccountcreateAccountWithId(String username, int reservedId) static AccountcreateAccountWithPassword(String username, String password) Deprecated.static PlayercreatePlayer(Player character, int reservedId) static voiddeleteAccount(Account target) static voiddeleteFriendship(Friendship friendship) static booleandeleteItem(GameItem item) static booleandeleteMail(Mail mail) static booleandeleteQuest(GameMainQuest quest) static AccountgetAccountById(String uid) static AccountgetAccountByName(String username) static AccountgetAccountByPlayerId(int playerId) static AccountgetAccountBySessionKey(String sessionKey) static AccountgetAccountByToken(String token) getAllMail(Player player) static List<GameMainQuest>getAllQuests(Player player) getAvatars(Player player) static List<Friendship>getFriends(Player player) static List<GachaRecord>getGachaRecords(int ownerId, int page, int gachaType) static List<GachaRecord>getGachaRecords(int ownerId, int page, int gachaType, int pageSize) static longgetGachaRecordsMaxPage(int ownerId, int page, int gachaType) static longgetGachaRecordsMaxPage(int ownerId, int page, int gachaType, int pageSize) getInventoryItems(Player player) static intgetNextPlayerId(int reservedId) static PlayergetPlayerById(int id) static List<Friendship>getReverseFriends(Player player) static FriendshipgetReverseFriendship(Friendship friendship) static voidsaveAccount(Account account) static voidsaveAvatar(Avatar avatar) static voidsaveFriendship(Friendship friendship) static voidsaveGachaRecord(GachaRecord gachaRecord) static voidstatic voidstatic voidsavePlayer(Player character) static voidsaveQuest(GameMainQuest quest)
-
Constructor Details
-
DatabaseHelper
public DatabaseHelper()
-
-
Method Details
-
createAccount
-
createAccountWithId
-
createAccountWithPassword
Deprecated. -
saveAccount
-
getAccountByName
-
getAccountByToken
-
getAccountBySessionKey
-
getAccountById
-
getAccountByPlayerId
-
deleteAccount
-
getAllPlayers
-
getPlayerById
-
checkPlayerExists
public static boolean checkPlayerExists(int id) -
createPlayer
-
getNextPlayerId
public static int getNextPlayerId(int reservedId) -
savePlayer
-
saveAvatar
-
getAvatars
-
saveItem
-
deleteItem
-
getInventoryItems
-
getFriends
-
getReverseFriends
-
saveFriendship
-
deleteFriendship
-
getReverseFriendship
-
getGachaRecords
-
getGachaRecords
-
getGachaRecordsMaxPage
public static long getGachaRecordsMaxPage(int ownerId, int page, int gachaType) -
getGachaRecordsMaxPage
public static long getGachaRecordsMaxPage(int ownerId, int page, int gachaType, int pageSize) -
saveGachaRecord
-
getAllMail
-
saveMail
-
deleteMail
-
getAllQuests
-
saveQuest
-
deleteQuest
-