sqlite -> sqlite3

This commit is contained in:
Dr. Patrick Urbanke
2025-03-18 03:23:04 +01:00
parent 4113235d28
commit 447a7e3b88
+5 -5
View File
@@ -7,7 +7,7 @@ sqlgen is closely integrated with our sister project [reflect-cpp](https://githu
## Simple example
Here is how you create a simple sqlite database
Here is how you create a simple sqlite3 database
and insert some data:
```cpp
@@ -24,12 +24,12 @@ const auto people = std::vector<People>({
.last_name = "Simpson",
.age = 45}});
const auto conn = sqlgen::sqlite::connect("example.db");
const auto conn = sqlgen::sqlite3::connect("example.db");
// Will automatically create a table called 'People'
// with the columns 'first_name', 'last_name' and 'age',
// if necessary.
const auto result = sqlgen::sqlite::write(conn, people);
const auto result = sqlgen::sqlite3::write(conn, people);
if (!result) {
std::cout << result.error().what() << std::endl;
@@ -43,9 +43,9 @@ and print the results as a JSON:
#include <rfl/json.hpp> // reflect-cpp
#include <sqlgen/sqlite.hpp>
const auto conn = sqlgen::sqlite::connect("example.db");
const auto conn = sqlgen::sqlite3::connect("example.db");
const auto people = sqlgen::sqlite::read<People>(conn);
const auto people = sqlgen::sqlite3::read<People>(conn);
if (people) {
std::cout << rfl::json::write(*people) << std::endl;