Scott Kyle
d7474cabc6
Improve parsing of string tokens
...
All of the parsing behavior was confirmed to be compatible with the NSPredicate parser.
2016-05-26 01:04:41 -07:00
Ari Lazier
3b6ee92224
merge master
2016-05-19 14:08:42 -07:00
Scott Kyle
56b0871a26
Add a few more parser tests
2016-05-19 13:08:39 -07:00
Scott Kyle
6c0608356a
Allow key paths to start with "not" in queries
...
Fixes #445
2016-05-19 01:26:13 -07:00
Ari Lazier
e438d8b586
update object store
2016-05-13 18:04:05 -07:00
Thomas Goyne
db55770bfa
Move the notifications fuzzer to the tests directory
2016-05-11 16:08:30 -07:00
Mark Rowe
ef1c6ddc63
Add support for fine-grained notifications from backlink TVs
2016-05-11 16:08:30 -07:00
Thomas Goyne
03108713ee
Make PropertyType an enum class
2016-05-11 16:08:30 -07:00
Thomas Goyne
4cf5d5db4c
Report modification paths as pre-delete/inserts as required for UITableView
2016-05-11 16:08:30 -07:00
Thomas Goyne
d8a69b87dc
Improve change calculation performance for nontrivial object graphs
...
Skip doing any checking at all if none of the tables reachable from the root
table have been modified (which can happen if the table version was bumped due
to insertions, unrelated backlinks, or unlinked-to rows being deleted in linked
tables).
Add cycle checking rather than relying on the max depth to handle it, as the
worst case was O(N^16) if the cycle involved a LinkList of size N.
Track which rows have been confirmed to have not been modified.
Cache the information about the links for each of the relevant tables as
checking the table schema can get somewhat expensive.
2016-05-11 16:08:30 -07:00
Thomas Goyne
f9364b50a4
Return the correct iterator from ChunkedVector::erase()
...
When a chunk is removed entirely it should return an iterator to the first
element in the next chunk, not the last.
2016-05-11 16:08:30 -07:00
Thomas Goyne
4df552ba2d
Clean up old move info even when the row being deleted is the last one
2016-05-11 16:08:30 -07:00
Thomas Goyne
3218740fd9
Fix the check for a deleted LV in ListNotifier::add_required_change_info()
2016-05-11 16:08:30 -07:00
Thomas Goyne
632d757014
Always deliver results to the correct SharedGroup
...
If there are multiple Realm instances for a single file on a single thread due
to disabling caching we need to actually deliver the results to the appropriate
SharedGroup for each notifier rather than delivering them all to the first one.
2016-05-11 16:08:30 -07:00
Thomas Goyne
c0350b9001
Rename CollectionChangeIndices to CollectionChangeSet
2016-05-11 16:08:30 -07:00
Thomas Goyne
953e1b15a8
Rename BackgroundCollection to CollectionNotifier
2016-05-11 16:08:30 -07:00
Thomas Goyne
238e9e3b6b
Fix tracking of which tables need change info with multiple source notifier versions
2016-05-11 16:08:30 -07:00
Thomas Goyne
155d949793
Only track inserts and deletes for tables being queried directly
...
# Conflicts:
# src/collection_notifications.cpp
# src/collection_notifications.hpp
2016-05-11 16:08:30 -07:00
Thomas Goyne
a86265f4dc
Move CollectionChangeBuilder to background_collection.hpp
2016-05-11 16:08:30 -07:00
Thomas Goyne
bc78c02e9d
Fix quadratic runtime of move_last_over() parsing
2016-05-11 16:08:30 -07:00
Thomas Goyne
7a75e2bae2
Use a better data structure for IndexSet
...
Switch to a chunked vector-of-vectors which makes mid-insertions on large sets
much faster, and cache the begin/end/count for each chunk to make lookups much
more cache-friendly.
2016-05-11 16:08:30 -07:00
Thomas Goyne
f051337cd3
Rename erase_and_unshift() to erase_or_unshift()
2016-05-11 16:08:30 -07:00
Thomas Goyne
dd336120b2
Fix compilation with GCC 4.9
2016-05-11 16:08:30 -07:00
Thomas Goyne
bab5540cf6
Fix incorrect results when the second-to-last row is deleted
2016-05-11 16:08:30 -07:00
Thomas Goyne
20d9da973b
Make List and Results notifications more consistent
...
Deliver the initial results for both of them and include the changeset
in the initial delivery for both, rather than having them behave weirdly
differently.
2016-05-11 16:08:30 -07:00
Thomas Goyne
7a74a22558
Fix tracking of modifications after linkview moves
2016-05-11 16:08:30 -07:00
Thomas Goyne
ef632804ef
Clean up stale moves for linkviews even without a merge
2016-05-11 16:08:30 -07:00
Thomas Goyne
feed7c3479
Update moves when there is another move to exactly the previous move target
2016-05-11 16:08:30 -07:00
Thomas Goyne
0a3158ce74
Fix marking deletions when chaining move_last_over()
2016-05-11 16:08:30 -07:00
Thomas Goyne
1289c4806c
Fix handling of move_last_over() on the second-to-last row
2016-05-11 16:08:30 -07:00
Thomas Goyne
edc0d1fc4a
Improve and expand the changeset calculation tests
2016-05-11 16:08:30 -07:00
Thomas Goyne
0e11a791e9
Improve and expand the IndexSet tests
...
This gets index_set.cpp back up to 100% line coverage from just the
targeted unit tests.
2016-05-11 16:08:30 -07:00
Thomas Goyne
dc7ddfae84
Treat Results from LinkViews as if they were sorted for diff calculations
2016-05-11 16:08:30 -07:00
Thomas Goyne
71911ee221
Add support for wrapping a LinkView in a Results
2016-05-11 16:08:30 -07:00
Thomas Goyne
88a3b6ed00
Speed up the IndexSet combining operations
2016-05-11 16:08:30 -07:00
Thomas Goyne
7f5277a97b
Run RealmCoordinator::on_change() on a different thread when using tsan
2016-05-11 16:08:30 -07:00
Thomas Goyne
c6def6b814
Don't parse the transaction logs on the background thread if no change info is needed
2016-05-11 16:08:30 -07:00
Thomas Goyne
9503a3fc03
Always send an empty changeset to the first call of a Results notification callback
2016-05-11 16:08:30 -07:00
Thomas Goyne
e65ad4d413
Discard moves which are turned into no-ops when merging
2016-05-11 16:08:30 -07:00
Thomas Goyne
cfb9f0635c
Fix calculation of moves for unsorted queries
2016-05-11 16:08:30 -07:00
Thomas Goyne
d22c65f28a
Partially split out the code for calculating changesets from the struct for delivering them
2016-05-11 16:08:30 -07:00
Thomas Goyne
424f4e829f
Prioritize modified rows when calculating changes for sorted results
2016-05-11 16:08:30 -07:00
Thomas Goyne
a428f813d5
Skip calling callbacks if two commits cancel each other out when merged
2016-05-11 16:08:30 -07:00
Thomas Goyne
e25e4c2dcd
Rework handling of mixed move_last_over() and modifications to actually work
2016-05-11 16:08:30 -07:00
Thomas Goyne
d46f2c65ba
Refactor the transaction log parsers to eliminate some duplication
2016-05-11 16:08:30 -07:00
Thomas Goyne
f4aaa7c9de
Add fine-grained notifications for Results
2016-05-11 16:08:30 -07:00
Thomas Goyne
6609bcaed7
Add fine-grained notifications for List
2016-05-11 16:08:30 -07:00
Thomas Goyne
8f7ec85605
Add minimal transaction log parsing tests
2016-05-11 16:08:30 -07:00
Thomas Goyne
fafc4232ad
Rewrite the code coverage generation
...
Make lcov/gcovr an optional dependency that's only needed for Coverage
configurations, remove some pointless noisy messages when not generating
coverage, and generally simplify the whole thing.
2016-05-06 15:23:30 -07:00
Thomas Goyne
7ab91ea75e
Add cmake target to generate a code coverage report
2016-05-06 12:37:59 -07:00