This patch refactors Transaction / WriteTransaction code. It solves following issues:
- Checks whether one is allowed to perform write operations on DB are
performed at compile time instead of having bug-prone asserts.
Now one has to use
Transactionfor read-only access and
WriteTransactionfor read-write access.
- All modify operations are moved to
Transactioncontained some code which actually modified the DB (
addFailed), which contradicted the original idea of separation read-only and read-write access by having two classes.
- It also allows to simplify the
Transactioncode and drop shallow write-related proxy-methods that forwarded those calls to
The only transaction-related test (
testTimeInfo) actually tested
read-write operations, so it's moved to WriteTransactionTest.