Juce vs Qt

CoreData doesn’t have the template abstractions so it’s a step down in terms of wrapper quality.

In fact, the original soci wrapper was written to allow the back-end to be swapped out. Currently they support quite a large number of back-ends of which SQLite is just one:

http://soci.sourceforge.net/doc/structure.html
http://soci.sourceforge.net/doc/backends.html

It is entirely practical to implement a CoreData backend which would allow all of the expressive compact notation of the soci templates while also gaining the benefits of using the OS abstraction.

The database wrapper in VFLib started out as stock soci, and then I stripped out all of the features for supporting multiple backends - hardcoding it to be SQLite-only. The reason I did this is because not all database features can be cleanly mapped between backends. For example, the concept of “last insert rowid” varies from backend to backend (some don’t even have it). By restricting the scope of the VFLib database wrapper to SQLite only (which is the best embedded database) I was able to provide robust support for features available only in SQLite and not having to worry that these things would also work in MySQL or Oracle backends.

Right. The code you’ve shown is nice, and using sqlite3 in C is more complex.

I’ve used sqlite3 in my projects. None of them were very demanding, but once you’ve written a SQLQuery function, and some conversion functions for your structures, you’re done (I’ve done it multiple times, and never used SOCI). Your example showed that it’s 5 lines for a structure, even in C (the C++ code is not complete since you need to have a serialize method in “p” you’ve not shown)
Anyway, it’s feasible, whether you’re using SOCI, or your own code.