DSL for embedded in-memory databases compiled to C++
A DSL for declaring embedded in-memory databases that are emitted as C++ code. The user writes a SQL-style schema file defining tables, indexes, and the queries and procedures that operate on them, which is then compiled into a C++ header where the schema becomes a class and the queries/procedures become methods, replacing hand-built assemblages of STL containers wrapped in an engine object.
What it addresses
The author repeatedly hand-writes ad-hoc assemblages of STL containers (vectors of structs, maps, sets, running totals, min/max references) that act as tiny databases optimized for specific queries and constraints, and wants a way to declare these SQL-style and let the machine work out the details.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
DSL for embedded in-memory databases compiled to C++
A DSL for declaring embedded in-memory databases that are emitted as C++ code. The user writes a SQL-style schema file defining tables, indexes, and the queries and procedures that operate on them, which is then compiled into a C++ header where the schema becomes a class and the queries/procedures become methods, replacing hand-built assemblages of STL containers wrapped in an engine object.
Problem: The author repeatedly hand-writes ad-hoc assemblages of STL containers (vectors of structs, maps, sets, running totals, min/max references) that act as tiny databases optimized for specific queries and constraints, and wants a way to declare these SQL-style and let the machine work out the details.
Posted by @marssaxman · Original source ↗
Source text · @marssaxman · · Source ↗
I'm tinkering with a little DSL for declaring embedded in-memory databases, to be emitted as C++ code.