Ari Lazier
49fd092cae
Fix for whitespce
2016-06-02 22:05:17 -07:00
Scott Kyle
560e725398
Address some issues in WeakRealmNotifier for Node
2016-05-31 10:05:14 -07:00
Ari Lazier
7829cb5f33
fix for comment
2016-05-27 16:25:33 -07:00
Ari Lazier
3e74cd98d5
more pr feedback
2016-05-27 16:03:03 -07:00
Ari Lazier
e316b54eff
pr feedback
2016-05-27 15:50:33 -07:00
Ari Lazier
ceceeab9a5
object store pr feedback
2016-05-27 15:45:56 -07:00
Scott Kyle
d05542c031
Merge branch 'sk-node-notifier'
...
* sk-node-notifier:
Create a HandleScope before calling callbacks
Add a working WeakRealmNotifier for Node
2016-05-27 13:25:50 -07:00
Scott Kyle
39f0661535
Factor out padding rule for operators
2016-05-26 11:57:43 -07:00
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
Scott Kyle
20b121c57d
Add FIXME referencing core issue
2016-05-24 10:42:17 -07:00
Scott Kyle
2672cd901f
Fix crash and other errors with Results snapshots
...
When deleteAll() is called on a Realm, it calls clear() on all of its Tables, which seems to not update TableViews unless they are synced. The is_row_attached(row_ndx) method still returns true otherwise. A workaround is here until that is fixed.
Fixes #434
2016-05-20 13:42:17 -07:00
Scott Kyle
5198a5bf4b
Create a HandleScope before calling callbacks
2016-05-19 14:49:21 -07:00
Scott Kyle
938c7fb2f4
Add a working WeakRealmNotifier for Node
...
Uses libuv APIs to async schedule onto the default Node run loop.
2016-05-19 14:49:21 -07:00
Ari Lazier
3b6ee92224
merge master
2016-05-19 14:08:42 -07:00
Ari Lazier
50c7b6245f
make unique ptr manually
2016-05-19 14:06:14 -07:00
Scott Kyle
ea697f9904
Include comment about string_operator_t
2016-05-19 13:12:40 -07:00
Scott Kyle
56b0871a26
Add a few more parser tests
2016-05-19 13:08:39 -07:00
Ari Lazier
fc794bbf31
pr fixes
2016-05-19 12:22:07 -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
592a35a69e
add isValid methods to results and list
2016-05-16 16:01:14 -07:00
Ari Lazier
df716d3da1
fix for android compilation
2016-05-13 18:45:42 -07:00
Ari Lazier
e438d8b586
update object store
2016-05-13 18:04:05 -07:00
Ari Lazier
4334d55767
fix for android - create notifier after opening realm
2016-05-13 14:55:36 -07:00
Ari Lazier
80904e36e1
hopeful fix for android test
2016-05-13 14:15:34 -07:00
Thomas Goyne
db55770bfa
Move the notifications fuzzer to the tests directory
2016-05-11 16:08:30 -07:00
Thomas Goyne
e6d09b513e
Fix an assertion failure in IndexSet::do_add() following a table clear
...
We don't track insertions and deletions for tables that are merely linked to by
tables actually being observed (for performance reasons, since we don't need
that information), but the check for that was missing in one place. This would
be merely a slowdown rather than a crash, but deletions.add_shifted() can
overflow size_t if the passed-in index represents a newly inserted row and the
check for that didn't work due to not tracking insertions for the table.
The only remotely realistic way to actually have size_t overflow is to have
previously cleared the table (the table clear instruction does not include the
old size of the table, so it just marks {0, SIZE_T_MAX} as deleted).
Fixes #3537 .
2016-05-11 16:08:30 -07:00
Thomas Goyne
2bcf42904a
Fix some typos in comments
2016-05-11 16:08:30 -07:00
Thomas Goyne
b42bf25c99
Fix compilation with latest core
2016-05-11 16:08:30 -07:00
Thomas Goyne
8d9e5db092
Give a variable a less terrible name and add a comment
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
8879212111
Fix assertion failure when a notifier is removed before it runs
2016-05-11 16:08:30 -07:00
Thomas Goyne
eee6e55eb0
Refactor SortedMoveCalculator and add more of an explanation
2016-05-11 16:08:30 -07:00
Thomas Goyne
95900f5e17
Make more member functions in CollectionNotifier pure virtual
2016-05-11 16:08:30 -07:00
Thomas Goyne
9883944df4
Pull CollectionChangeBuilder into its own file
2016-05-11 16:08:30 -07:00
Thomas Goyne
66666a75b0
Iterate backwards to pick the last valid list in select_link_list
2016-05-11 16:08:30 -07:00
Thomas Goyne
23c16f8e67
Use aggregate initialization for the base class in CollectionChangeBuilder
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
fe5564f40e
Change all of the mentions of 'query' in NotificationToken to 'notifier'
2016-05-11 16:08:30 -07:00
Thomas Goyne
31c3982bff
Fix some typos
2016-05-11 16:08:30 -07:00
Thomas Goyne
e75ff49421
Fix check for the target results being invalid in ResultsNotifier::deliver()
...
m_target_results is no longer actually set to null when the notifier is
unregistered, so check the thing which is (i.e. m_realm).
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
ea3a2f4711
Refactor the incremental change tracking for mixed source versions
2016-05-11 16:08:30 -07:00