std::string current_timestamp();
Performs SELECT CURRENT_TIMESTAMP and returns the result as std::string.
SELECT CURRENT_TIMESTAMP
std::string
Current timestamp generated by sqlite3 engine. Example: 2017-03-05 15:37:14
2017-03-05 15:37:14
struct Human { int company; std::string name; std::shared_ptr<std::string> job; }; using namespace sqlite_orm; auto storage = make_storage("jobs.sqlite", make_table("jobs", make_column("company", &Human::company), make_column("name", &Human::name), make_column("job", &Human::job))); storage.sync_schema(); auto currentTimestamp = storage.current_timestamp(); cout << "currentTimestamp = " << currentTimestamp << endl;
Output:
currentTimestamp = 2017-03-05 15:37:14
It doesn't matter what classes are mapped to storage - this function call doesn't depend on any of mapped classes.
There was an error while loading. Please reload this page.