566 Commits

Author SHA1 Message Date
Ari Lazier
641eb37b2c fixes for android 2016-03-03 14:56:18 -08:00
Scott Kyle
17eb6bcbb5 submodule fixes 2016-03-03 14:48:41 -08:00
Ari Lazier
4923d7d953 object store fixes for js binding 2016-03-03 14:45:44 -08:00
Ari Lazier
548d700ffe object store fixes for js binding 2016-03-03 14:45:44 -08:00
Ari Lazier
7802a9e976 merge latest object store 2016-03-03 14:15:54 -08:00
Ari Lazier
05429a8163 merge latest object store 2016-03-03 14:15:54 -08:00
Ari Lazier
5f61fd970c support relative paths when opening realms 2016-03-03 13:33:49 -08:00
Scott Kyle
42cdf9daad Disallow non-constructors to have schema property
Non-constructor functions (e.g. arrow functions and native functions) as well as regular objects should not be allowed as valid schema hosts. Neither of these cases were ever actually tested or used anywhere.
2016-03-03 02:52:15 -08:00
Scott Kyle
85832f0f02 Rename some functions according to PR feedback 2016-03-03 02:49:37 -08:00
kishikawa katsumi
9045d79453 Bool and NSDate properties can be indexed.
Core supports indexing Bool and NSDate properties.
realm-java also supports indexing Bool and NSDate properties.
It is better to align the specification with realm-java.
2016-03-02 13:20:29 -08:00
Scott Kyle
4a81b091cb Accept constructor in create() and objects() methods
This will help the linter prevent spelling mistakes and make some code more easily readable.

Resolves #233
2016-03-01 00:46:03 -08:00
Scott Kyle
3858ede7c7 Rename RJSObjectSetProperty to RJSValidatedSetProperty 2016-02-29 12:37:28 -08:00
Scott Kyle
5a9ad4f2b9 Rename InvalidConstructor to UncallableConstructor 2016-02-29 12:35:12 -08:00
Scott Kyle
44a29d8dd4 Expose List and Results constructors into JS 2016-02-29 03:24:58 -08:00
Scott Kyle
154422a3d1 Make realm instances pass instanceof check 2016-02-29 03:24:58 -08:00
Ari Lazier
e495cc4685 add encryption support 2016-02-26 11:08:59 -08:00
Thomas Goyne
b7b2822082 Make it possible to disable the commit notifier background worker
This makes it much easier to write tests which test the work done on the
background thread.
2016-02-25 11:19:00 -08:00
Thomas Goyne
cfc88b6fd5 Rename CachedRealm to WeakRealmNotfier 2016-02-24 16:58:11 -08:00
Thomas Goyne
143cc3b696 Fix compilation with GCC 4.9
4.9 does not correctly implement C++14 aggregate initialization.
2016-02-24 16:58:11 -08:00
Thomas Goyne
99037a7c72 Add an AtomicSharedPtr implementation for gcc 4.9 2016-02-24 16:58:11 -08:00
Thomas Goyne
1e35324d97 Avoid holding locks while calling transaction::advance()
It can call user code due to change notifications, which leads to
deadlocks if that code then tries to add async queries (and advancing is
a potentially expensive operation, so doing it while holding a lock
inhibits parallelism anyway).
2016-02-24 16:58:11 -08:00
Thomas Goyne
8284340729 Remove redundant check in RealmCoordinator::advance_helper_shared_group_to_latest() 2016-02-24 16:58:11 -08:00
Thomas Goyne
4e18a99dfd Update some out-of-date comments 2016-02-24 16:58:10 -08:00
Thomas Goyne
aa67216574 Write a much better comment about thread stuff for AsyncQuery 2016-02-24 16:58:10 -08:00
Thomas Goyne
ad46e307a2 Update the comments for Realm::Internal 2016-02-24 16:58:10 -08:00
Thomas Goyne
1430fcf474 Rename AsyncFriend to Interal 2016-02-24 16:58:10 -08:00
Thomas Goyne
c46a2a34de Fix typos and minor errors in comments 2016-02-24 16:58:10 -08:00
Thomas Goyne
db7d6fa2a8 Don't hold onto the tableview between runs of async queries
Updating the table view in advance_read() can be very expensive, and the
updated data is never actually used.
2016-02-24 16:58:10 -08:00
Thomas Goyne
a95eb50915 Don't create background queries for Results on threads without runloops 2016-02-24 16:58:09 -08:00
Thomas Goyne
3e90c30571 Add more tests and fix bugs 2016-02-24 16:58:09 -08:00
Thomas Goyne
8c4f2a4f30 Reduce the scope of class friendships 2016-02-24 16:58:09 -08:00
Thomas Goyne
13e1054553 Don't continue to run queries in the background if the result is unused 2016-02-24 16:58:09 -08:00
Thomas Goyne
934263f76a Automatically create the async query when converting to a TableView 2016-02-24 16:58:09 -08:00
Thomas Goyne
8f668fdf09 Use a single AsyncQuery per Results regardless of number of callbacks added 2016-02-24 16:58:08 -08:00
Thomas Goyne
d165458601 Add support for running queries asynchronously 2016-02-24 16:58:08 -08:00
Thomas Goyne
bceec93a69 Update to core 0.96.2 2016-02-23 15:01:35 -08:00
Tim Anglade
7cc2f69736 Merge pull request #264 from realm/km-js-fixlicense
License update
2016-02-21 18:56:59 -08:00
Nabil Hachicha
9bcebfaf29 PR feedback 2016-02-19 22:50:30 +00:00
Nabil Hachicha
76981229ab start debug server only on when using chrome debug 2016-02-19 19:05:07 +00:00
Thomas Goyne
ae9d41f9ce Remove an incorrect std::move() 2016-02-18 19:05:02 -08:00
Scott Kyle
2e3a3b5db8 Merge pull request #257 from realm/sk-schema-prop
The schema property should be directly on constructor
2016-02-18 16:27:47 -08:00
Karson Miller
5e9333b699 no message 2016-02-18 15:30:44 -08:00
Scott Kyle
a661350e59 Merge branch 'sk-sorted-results'
* sk-sorted-results:
  Add sorted() method to List
  Further improve argument checking for sorted()
  Improve error message in sorted() method
  Change sortedBy API as discussed
  Allow sortedBy to accept array of properties
  Change sortByProperty to return new Results
2016-02-18 15:21:35 -08:00
Scott Kyle
5b2e7b37af Add script to update version in package.json and iOS
This uses agvtool to update the CURRENT_PROJECT_VERSION and DYLIB_CURRENT_VERSION project variables. The Info.plist files have been updated to propagate this value.
2016-02-18 13:58:12 -08:00
Scott Kyle
5332131c14 Add sorted() method to List 2016-02-18 13:41:11 -08:00
Scott Kyle
d847fbceb1 Further improve argument checking for sorted() 2016-02-18 12:55:54 -08:00
Scott Kyle
bd766297ef Improve error message in sorted() method 2016-02-18 12:50:44 -08:00
Scott Kyle
05d84b23a2 Change sortedBy API as discussed
If provided an array, then each member can optionally be an array of [propName, reverse]
2016-02-18 12:47:18 -08:00
Scott Kyle
76865d0da4 Allow sortedBy to accept array of properties
It now optionally accepts an array of properties for both parameters and the tests have been updated to reflect new capabilities.
2016-02-18 11:58:39 -08:00
Scott Kyle
249bcd8f3f Change sortByProperty to return new Results
The method name changed to sortedBy to reflect that it returns a new Results object and to be more succinct. Also, the second optional argument instead reflects descending (or rather, reverse) since it's an anti-pattern to have an optional argument default to true in JS, and this also follows precedences set by other JS libraries and by Python's sorted function.
2016-02-18 11:58:39 -08:00