[IN PROGRESS] Implement SQLite as a replacement for XML-based storage in saving game data#133
Draft
Dimakl wants to merge 11 commits intoFreeCol:sf-auto-mergefrom
Draft
[IN PROGRESS] Implement SQLite as a replacement for XML-based storage in saving game data#133Dimakl wants to merge 11 commits intoFreeCol:sf-auto-mergefrom
Dimakl wants to merge 11 commits intoFreeCol:sf-auto-mergefrom
Conversation
sql create script added
Update SaveGameValidator.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces SQLite as a solution for storing and managing game data, replacing the current XML-based file structure. The outdated method of storing files locally and serializing game parameters into an XML file no longer meets the requirements for a robust and secure storage mechanism. In addition, document-oriented storage is not the optimal solution for a project with multiple users since similar fields are present across XML files belonging to different players.
By replacing XML storage with SQLite, the following benefits can be achieved:
The proposed changes include implementation and tests for the
FreeColSQLWriterandFreeColSQLReaderclasses, which handle writing and reading game data to and from the SQLite database, respectively. The new classes cover various game components such as game state, player data, and tile data. This pull request serves as the foundation for further enhancement in game data management and the introduction of more features that rely on database functionality.