getIntervalsByIds will be used by commands that are loading complete database
currently when they really want a few intervals that the user specified by ID.
Related to issue #245
The getUntracked, called as part of the `timew gaps` command, is
normally looking at a relatively recent interval. We do not want to take
the performance hit of loading the entire database into memory when
processing this command.
Related to issue #245
The database class now separatly tracks tag information. So for the one
place where all the inclusions were iterated over in order to build up a
tag set, we now instead ask the database for this set directly.
Related to issue #245
This does not appear to be necessary anymore given that the database lines are
generated from intervals and are all well formed. Any open interval *should* be
at the end of the database.
Related to issue #245.
intervalSummarize is called at the end of most commands. The cost of parsing
all the lines in the database can be significant as the size of the database
grows.
Related to issue #245.
This allows the database to be treated as a single collection of strings, but
can be used to avoid loading the entire database when only interested in recent
entries.
Related to issue #245.
Not only does this eliminate the need to copy the stings to the caller, it will
also eliminate the need for any iterators over the entries in the Database from
having to hold a copy of the lines from the Datafile.
Related to #245.
Recently I was trying to stop an interval that I had left open over the
weekend, but I had already started a new interval at the beginning of the
week. The error I was received was "The end of a date range must be after the
start." which was confusing to me.
After a few moments I realized I should have been using the modify command.
Now the stop command will suggest modify if someone attempts to use stop for
this purpose.
- `Datetimee("tomorrow")` can create extra exclusion ahead of current time
which in turn create erroneous synthetic intervals
- Fixes#260
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
If there are escaped quotes in the tags database file, when the file is read,
then written, additional escape characters were inserted.
For example:
When tag 'a "test"' is written, it gets stored as 'a \"test\"'. Then it's read
back in that form, but the next time it's serialized to disk, the quotes would
be escaped again resulting in 'a \\"test\\"' which has the effect of removing
the escapes for the double-quotes.
Escapes the quotes for the annotations in the data file, and when
converting an interval to JSON.
The quotes in the annotations were already dequoted in
IntervalFactory::fromSerialization, so we only needed to quote the strings
when serializing or dumping to JSON.