hjorthjort/CapStat

Implement functionality to save match results in a local file

Closed this issue · 2 comments

Alongside the database - soon to be set up - we will need a way to store results, temporarily, outside of the database, to make sure no data is lost even with crashes, errors or connectivity issues.

The most reasonable way should be to store the SQL queries meant to be sent to the database as rows in a text file, and delete the rows only when they have definitely been saved to the database.

Idea: When a match is saved in any way, save it immediately to a text file. When there are rows in the text file that are not yet saved to the database, let a background Thread save them. (Maybe let the Thread update listeners on its progress, so that progress bars can be shown?) When the Thread knows for sure that a row has been saved, it deletes it from the text file.

Solved in #14