Abstract SQL query class CSqlQry which contains all query logic. All the programmer needs to do is implement a child query class, define the fields in a Dictionary format and define the getters/setters (refer to UnitTest project for examples)
Added 'CrateDB.sql' file in the Database folder of the Project folder. When a new database is created, the app will populate it with tables and data. Any future schema changes should be added to both the 'CreateDB' file and a separate .sql file (eg. Schema_1.0.1.sql) so that the app can auto-update (maybe in the future, download any schema updates from the internet?)
Added UnitTest project to the solution and added some database connection and query tests. We should probably aim to add tests with each new feature or bug fix.
TODOs:
Support for additional SQL features (<, <=, >=, >, !=, IS NULL, IS NOT NULL, IN (...), JOINS, ORDER BY, GROUP BY)
Those can be implemented as needed
Add automatic schema upgrade mechanism
Load JSON game data and save to database (full migration)
Integration with the rest of the system
NOTEs:
The current changes are non-invasive (ie. they don't change anything in the app)
Added SQLite core implementation:
CSqlQry
which contains all query logic. All the programmer needs to do is implement a child query class, define the fields in a Dictionary format and define the getters/setters (refer to UnitTest project for examples)Added 'CrateDB.sql' file in the Database folder of the Project folder. When a new database is created, the app will populate it with tables and data. Any future schema changes should be added to both the 'CreateDB' file and a separate .sql file (eg. Schema_1.0.1.sql) so that the app can auto-update (maybe in the future, download any schema updates from the internet?)
Added UnitTest project to the solution and added some database connection and query tests. We should probably aim to add tests with each new feature or bug fix.
TODOs:
NOTEs: