Thomas Goyne
9a31febc4c
Add support for lists of things other than objects
...
And add a shorthand syntax for schema definitions.
2017-09-26 11:40:22 -07:00
Thomas Goyne
086f31c07f
Use the objectstore keypath sorting functionality
...
Adds support for sorting on values over links, reduces the amount of code in
the binding, and is required for sorting non-object lists.
2017-09-21 10:41:19 -07:00
astigsen
db4e184524
Added method to find index of object in collections ( #1094 )
...
* Added method to find index of object in collections
* rework as the indexOf method
2017-06-26 13:43:49 +02:00
Nabil Hachicha
43dabf5cbd
Nh/symbol iterator android ( #732 )
...
* Fix Symbol.iterator on Android
2016-12-20 18:56:51 +00:00
Scott Kyle
af70bb3c63
Fix all linting issues inside JS tests
2016-05-26 15:47:30 -07:00
Scott Kyle
48394d9c19
Automatically handle deleting test Realms
...
No longer leave this up to the test. All testing passes through the runTest() function, so we use that spot to delete the Realms. It also now deletes them beforehand too since a crash in a previous run could leave a Realm in place.
2016-05-26 15:47:30 -07:00
Scott Kyle
e14e922c39
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
Ari Lazier
fd25afe214
add isValid methods to results and list
2016-05-16 16:01:14 -07:00
Scott Kyle
7a26d192ba
Merge pull request #427 from realm/sk-object-inheritance
...
Fix ES6 class inheritance of Realm.Object with Babel
2016-05-16 11:17:45 -07:00
Scott Kyle
4300e865c7
Abstracted check for Node v6
2016-05-10 11:34:33 -07:00
Scott Kyle
26d2c169a9
Support ES6 class inheritance from Realm.Object
...
Unfortunately, this was broken because our native Realm.Object constructor was not presenting itself as a function in JS. This fixes that and adds tests.
2016-05-09 16:49:05 -07:00
Scott Kyle
4a5ac413cc
Skip test in Node v6 due to v8 regression
2016-05-04 02:15:17 -07:00
Scott Kyle
8c66bab8aa
Make collection iterators actually iterable
...
The ES6 spec calls for this so these iterators are usable in for-of loops, with spread operators, etc.
2016-03-20 11:51:16 -07:00
Scott Kyle
b5ce02c0ce
Make List and Results inherit from Collection
...
This will allow for easier type checking, documentation, etc.
2016-03-20 11:51:16 -07:00
Scott Kyle
9ba477762a
Update splice tests to test added behavior
2016-03-17 14:53:42 -07: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
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
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
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