Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
sqlite_orm/sqlite_orm.h
✓ #include <sqlite_orm/sqlite_orm.h>
Creates a SQLite database with a User table, inserts a record, and retrieves all users.
#include <sqlite_orm/sqlite_orm.h>
#include <iostream>
struct User {
int id;
std::string name;
};
int main() {
using namespace sqlite_orm;
auto storage = make_storage("test.db",
make_table("users",
make_column("id", &User::id, primary_key()),
make_column("name", &User::name)
)
);
storage.sync_schema();
storage.insert(User{0, "John"});
auto users = storage.get_all<User>();
for (auto &user : users) {
std::cout << user.name << std::endl;
}
return 0;
}
Debug
Known issues
No known issues recorded.
Audit
Dependencies
No dependency data recorded yet.
Resources
No resource links recorded.