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
Scott Kyle
37b2c35169
Add Symbol.iterator method to List and Results
...
Resolves #235
2016-03-02 23:00:53 -08:00
Scott Kyle
1cba02c34d
Fix broken iterator methods on Android
...
Turns out the JSC included with React Native on Android includes a buggy implementation of ArrayIterator that is missing an exposed next() method, so we implement it ourselves instead.
2016-03-02 22:57:36 -08:00
Mark Rowe
c7f4133414
Merge pull request #50 from realm/mar/cmake-linux-and-local-core
...
Support building on Linux and with local builds of core
2016-03-02 16:39:07 -08:00
Thomas Goyne
d73c7dba88
Merge pull request #42 from realm/tg/async-query
...
Add support for async queries
2016-03-02 15:13:18 -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
Mark Rowe
3602cf7588
Factor duplicated logic out into a macro.
2016-03-02 01:16:11 -08:00
Mark Rowe
ccdc3b0754
Add info to the README about using a local build of core.
2016-03-02 01:02:11 -08:00
Mark Rowe
8c56d13382
Support building on Linux.
...
By default, Linux uses a locally-built version of core that is prepared
in an independent working copy of the realm-core git repository.
Support is also added for using an existing local build of core on both
OS X and Linux . This can be done by running
`cmake -DREALM_CORE_VERSION=/path/to/realm-core`. The generated build
system will invoke `sh build.sh build` within the given directory prior
to building the object store.
2016-03-02 01:02:11 -08:00
Ari Lazier
062db0e95d
Merge pull request #43 from realm/al/contains-test
...
Test contains can be used as a property name in the parser
2016-03-01 13:45:43 -08:00
Scott Kyle
00b19d95b8
Use device IP addresses to connect to RPC host
...
It still only tries localhost for the simulator, but for devices, we now get a list of possible IP addresses to attempt to connect to before throw a more helpful exception.
Resolves #284 and fixes #276
2016-03-01 00:56:45 -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
578e6b9742
Merge pull request #288 from realm/sk-array-methods
...
Steal Array.prototype methods for List and Results
2016-03-01 00:38:27 -08:00
Scott Kyle
72bf66e57e
Check for some iterator methods before testing them
...
Some JS engines (like Chrome) are skipping over values() due to a web compatibility reason for right now.
2016-03-01 00:14:18 -08:00
Scott Kyle
bceef3c340
Move encryption-tests to right directory
...
This wasn't caught in a rebase, oops!
2016-02-29 12:39:00 -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
ad24673776
Rename util.createList to createCollection
...
Sounds more generic this way.
2016-02-29 12:34:29 -08:00
Scott Kyle
4ea2e729b4
Support many Array methods on List and Results
...
Resolves #18
2016-02-29 03:24:58 -08:00
Scott Kyle
236d0a5eed
Ensure List and Results constructors throw exception
...
This was already done from native code, but needed to happen for the browser shim and be tested.
2016-02-29 03:24:58 -08:00
Scott Kyle
b1f656a252
Convert browser module to use ES6 modules
2016-02-29 03:24:58 -08:00
Scott Kyle
44a29d8dd4
Expose List and Results constructors into JS
2016-02-29 03:24:58 -08:00
Scott Kyle
a5ec799a7c
Copy whole lib module into JS test bundle
...
This meant we needed to rename tests/lib to tests/js so they folder names would not conflict.
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
Scott Kyle
97e6166597
Move browser JS shim under its own directory
2016-02-29 03:24:58 -08:00
Ari Lazier
66404c4d81
Merge pull request #282 from realm/al-encryption
...
Add encryption support
2016-02-26 11:55:03 -08:00
Ari Lazier
4177b0fb40
fix for test naming
2016-02-26 11:18:47 -08:00
Ari Lazier
00d2c2a74a
add encryption support
2016-02-26 11:08:59 -08:00
Ari Lazier
e495cc4685
add encryption support
2016-02-26 11:08:59 -08:00
Thomas Goyne
086192f8d3
Add minimal Results notification tests
2016-02-26 10:24:46 -08:00
Thomas Goyne
773e7db14d
Add a helper class to generate temp paths for tests
2016-02-26 09:47:51 -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