Framework for generating application code from SQL

Hynek Mach · Digital Repository (National Repository of Grey Literature) · 2026

Integration of relational SQL database into any application inevitably leads to the inconvenience of having two sources of truth. This leads to fragile balance as application code can easily be in conflict with the underlying database structure described with SQL. Common solution is to employ code-first ORM framework, choosing application code as the superior source of truth. Code-first frameworks bring their own set of problems, such as big memory demands, possibly inefficient queries, database non-transparency, and possible inability to make use of already written SQL. In an attempt to solve these issues, with regard to already existing solutions, we have designed a database-first ORM framework, capable of generating C++ code from given SQL queries in the SQLite dialect. Highlights of supported features include: strongly typed structures generation, queries into functions encapsulation, and queries into repositories distribution. With extensibility and modifiability as priorities, the created application is overall providing a strong base for widely usable database-first framework.

Read the paper · More papers on PaperTik