DatabasePlugin: add method GetUpdateStamp()
Refactor SimpleDatabase::GetLastModified() to be generic for all plugins. Remove the SimpleDatabase assumption from db_stats_print(), allowing it to be implemented by all database plugins.
This commit is contained in:
@@ -148,12 +148,12 @@ DatabaseGlobalOpen(Error &error)
|
||||
return true;
|
||||
}
|
||||
|
||||
time_t
|
||||
db_get_mtime(void)
|
||||
bool
|
||||
db_exists()
|
||||
{
|
||||
assert(db != nullptr);
|
||||
assert(db_is_open);
|
||||
assert(db_is_simple());
|
||||
|
||||
return ((SimpleDatabase *)db)->GetLastModified();
|
||||
return ((SimpleDatabase *)db)->GetUpdateStamp() > 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user