WIP: Serlialization of ESM / game data to SQLite
For now this MR doesn't provide any interaction with the Lua API. You can find my current progress on that here. I plan to include those changes into this MR after the Lua MR is merged.
Current progress:
- Support models with one-to-one relations of any depth.
- Constructing queries with SQL-like features: filters ("where"), sorting ("orderBy"), taking one of a group ("groupBy"), limit, offset, including relations ("with")
- Query through iterators of those models.
- SQLite support: create tables, insert models into them, generate SQL to select with a given query.
- A minimal set of models for ESM records to showcase functionality.
Remaining plans:
- One-to-many relations.
- Models for all ESM records and relevant runtime MWWorld records
- Proper tests with actual OpenMW records and high code coverage.
For the first phase of Lua API, we might not need to merge the SQLite part yet, so I expect to split it off into another MR at some point.
You can find an example of already working Lua requests here.
If you want to see the C++ query syntax, you can find some examples in
apps\openmw_test_suite\sqlite\test_sqlite_queryable.cpp and apps\openmw_test_suite\serialize\test_iteratorqueryable.cpp
Edited by uramer