WIP: Serlialization of ESM / game data to SQLite

Forum thread here

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:

  1. Support models with one-to-one relations of any depth.
  2. Constructing queries with SQL-like features: filters ("where"), sorting ("orderBy"), taking one of a group ("groupBy"), limit, offset, including relations ("with")
  3. Query through iterators of those models.
  4. SQLite support: create tables, insert models into them, generate SQL to select with a given query.
  5. A minimal set of models for ESM records to showcase functionality.

Remaining plans:

  1. One-to-many relations.
  2. Models for all ESM records and relevant runtime MWWorld records
  3. 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

Merge request reports

Loading