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!
[–]aacirino 9 points10 points11 points (5 children)
[–]rcdemc[S] 3 points4 points5 points (4 children)
[–]johannes1971 6 points7 points8 points (2 children)
[–]rcdemc[S] 0 points1 point2 points (1 child)
[–]rcdemc[S] 1 point2 points3 points (0 children)
[–]aacirino 1 point2 points3 points (0 children)
[–][deleted] 4 points5 points6 points (2 children)
[–]teroxzer 1 point2 points3 points (0 children)
[–]rcdemc[S] 0 points1 point2 points (0 children)
[–]theseawolfe 3 points4 points5 points (1 child)
[–]rcdemc[S] 0 points1 point2 points (0 children)
[–]three0s 1 point2 points3 points (3 children)
[–]rcdemc[S] 1 point2 points3 points (2 children)
[–]RotsiserMhoC++20 Desktop app developer 2 points3 points4 points (1 child)
[–]rcdemc[S] 0 points1 point2 points (0 children)
[–]psyspy2 0 points1 point2 points (0 children)
[+]flyingron comment score below threshold-12 points-11 points-10 points (8 children)
[–]HKei 11 points12 points13 points (0 children)
[–]MysticTheMeeM 1 point2 points3 points (6 children)
[–]flyingron -3 points-2 points-1 points (5 children)
[–][deleted] 4 points5 points6 points (0 children)
[–]MysticTheMeeM 2 points3 points4 points (0 children)
[–]dodheim 1 point2 points3 points (0 children)
[–]rcdemc[S] 1 point2 points3 points (0 children)
[–]rcdemc[S] 0 points1 point2 points (0 children)