Hi,
This is my problem: I need to store a lot of log messages and thought it would be smart to keep it in a SQLite3 database to be able to search and filter it easily.
I will display the log messages in a standard list widget (using wxWidgets). The list will have several columns and can be sorted and filtered by the user.
Now, I'm not sure what is the best way to handle this. I'm thinking about some possible solutions:
- Read all messages to memory. When there is a new or changed log message (at a random position in the list) the whole list will have to be refreshed. Same thing when the user wants to filter the list or sort on a different column.
- Read all ID's into an array and retrieve the full log message on demand (when the user scrolls the list so that they are made visible).
- Use the SQL-interface to fetch the results on demand, using SQL to select the exact sub-result that is required.
But really, I'm just not used to working with this kind of problem, so any tips are appreciated!