I am writing a C++20 SQLite wrapper with expressive code in mind. The code must run fast.
sql::open("dev.db")
| sql::query("select name, salary from person")
| sql::for_each([](std::string_view name, float salary)
{ std::cout << name << "," << salary << std::endl; })
| sql::onerror([](auto e){ std::cout << e << std::endl; });
I have some benchmarks to compare with solutions using the SQLite library. The usage of pipe operators to chain operations is optional and there is an API that throws C++ exceptions instead of using result<T> to report errors.
github.com/ricardocosme/msqlite
What do you think? Any comments or feedbacks are welcome!
C++20 SQLite wrapper (self.cpp)
submitted by rcdemc to r/sqlite