Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <memory>
- #include "result.hpp"
- #include "result-mapping.hpp"
- #include "result-odb.hxx"
- #include "result-mapping-odb.hxx"
- #include <odb/sqlite/database.hxx>
- int main(int argc, char const *argv[]) {
- int Id = 1;
- std::array<float, 7> Values = {{0, 1, 2, 3, 4, 5, 6}};
- ResultFloatSeven S(Values, Id);
- {
- std::unique_ptr<odb::database> db(new odb::sqlite::database(
- "./test.db", SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE));
- odb::transaction t(db->begin());
- db->persist(S);
- t.commit();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement