Opened 14 years ago
Closed 14 years ago
#548 closed enhancement (fixed)
reopen should return flag indicating whether database has changed
Reported by: | Richard Boulton | Owned by: | Richard Boulton |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.0 |
Component: | Library API | Version: | SVN trunk |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
It would sometimes be very useful to know whether a call to reopen() has resulted in a new version being opened or not. This would allow things like schemas stored in database metadata to be refreshed only if the database has been modified. It seems natural enough to return this information as a boolean flag from Database::reopen().
The information needed to provide this return value seems easily available in chert, but may not be for all current or future backends.
The semantics would probably therefore need to be that a return value of "false" means that the database has definitely not reopened, but "true" means that the database might have been reopend. Any database can then return "true" always, and be "correct".
Change History (3)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Remote backend support added in r15662.
Needs test coverage still though.
I've implemented this in trunk r15607.
It's untested so far, but currently the disk based backends should support returning true/false as appropriate, remote always returns true, inmemory doesn't have anything to reopen so always returns false. For multiple databases, we return true if any of them returns true.
Still to do: