56 Commits

Author SHA1 Message Date
James Stone
591aa9fee7 Initial work for unnamed backlink queries and @links.@count tests 2018-04-10 16:37:41 -07:00
James Stone
497de5f3ea Fix named linking object queries across classes (#1734)
* Fix named linking object queries across classes
* Add change log entry, remove debug code
2018-04-03 11:48:33 +02:00
James Stone
187c4354f1 Inline method in hpp to remove duplicate definitions 2018-03-12 10:48:57 -07:00
Kenneth Geisshirt
8e63737008 Merge branch '2.3.x' of github.com:realm/realm-js into jas/backlink-queries 2018-02-27 11:32:33 +01:00
Kenneth Geisshirt
462856a24d
Partial sync (#1583)
The new Partial Sync API
2018-02-20 13:40:54 +01:00
James Stone
bd5c237b0f Named backlink queries working with core 5.3.0 2018-02-19 16:14:10 -08:00
James Stone
6f43324636 Preliminary work for queries over named backlinks 2018-02-13 16:17:27 -08:00
James Stone
b78a8a60d0 Hook up the sort/distinct orderings from parsed queries (#1653)
* Hook up the sort/distinct orderings from parsed queries
* Update changelog, better tests, fix syntax
2018-02-07 16:11:43 +01:00
Yavor Georgiev
ab02e26092
bump dependency versions 2018-02-05 18:52:40 +01:00
Mark Rowe
933b3ad765 Adopt core's query parser and update to core v5.1.2 (#1563)
* Adopt core's query parser.
* Realm Core 5.1.2
* Realm Sync 2.2.9
2018-01-11 11:52:46 +01:00
Thomas Goyne
643c19ea75 Add support for aggregates on arrays of primitives (#1401)
* Fix an unused variable warning in js_sync.hpp
* Add support for aggregates on arrays of primitives
* Update documentation and typescript declarations
* Update collection.js
2017-10-11 14:54:52 +02:00
Ashwin Phatak
4bcef8baff Add support for bulk updates (#808) 2017-10-10 16:25:47 +05:30
Kenneth Geisshirt
e109e32ac4 Merge branch 'master' of github.com:realm/realm-js into kneth/master-to-2.0.x 2017-09-30 09:55:14 +02:00
Ashwin Phatak
199210eb68 Add support for aggregates on collections (#807) (#1350) 2017-09-29 16:53:37 +05:30
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
Yavor Georgiev
05cce5aeec use newest object store 2017-08-17 13:01:01 +02:00
Yavor Georgiev
02c19bacb2 Close uv handles on the loop thread (#1125) 2017-07-07 14:50:34 +02: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
Mark Rowe
30e58022cf Include property names in type error exceptions thrown by Realm.create (#1069)
* Add and adopt `Value::is_binary` / `Value::to_binary` / `Value::from_binary`.

These methods allow conversions between `BinaryData` and the equivalent
JavaScript types without using `NativeAccessor`. Instead,
`NativeAccessor` now itself delegates to these methods.

* Have `NativeAccessor::value_for_property` and `RealmObjectClass::set_property`
verify that values are valid for the property in question.

If not, we throw an exception that includes the name and type of the
property in question.

`NativeAccessor` is changed to always hold a reference to a `Realm` and
an `ObjectSchema` in order to make this validation possible.

* Fix the Windows build.

* Remove an unused, incorrect forward declaration of a template class
  named `Realm` that caused ambiguity with object store's `Realm` class.
* Disambiguate between `realm::js::PropertyType` and
  `realm::PropertyType`.

* Update CHANGELOG.md
2017-06-20 14:40:01 +02:00
Yavor Georgiev
acd962d602 Make sure all callbacks enqueue on the Node.js event loop (#1079)
Fixes #1077
2017-06-19 13:19:43 +02:00
Thomas Goyne
08052e12f6 Update to work with new API for arrays of primitives 2017-05-17 11:02:45 -07:00
Yavor Georgiev
aa506935a5 Construct Results with object type name only (#959) 2017-04-18 13:41:44 +03:00
Yavor Georgiev
7c1dab7079 Propagate token refresh errors to the session error handler (#843)
* Get a session’s error handler

* Change the signature of all methods to add the callee

* Deserialize rpc callbacks

* Expose the session error handle on its config property

* When a token refresh error occurs and there is a session error handler

propagate the error to the handler
2017-02-07 11:01:26 +01:00
Ari Lazier
b2077910a4 fix for handle scope warning 2016-11-11 11:41:27 -08:00
Ari Lazier
9d0df0de3d Sync and fine grained notifications 2016-10-04 15:07:14 -07:00
Mark Rowe
5b888ed91d Update to core 1.5.0 and the latest version of the object store. 2016-08-15 11:29:58 -07:00
Thomas Goyne
f8ed437003 Update the binding for object store API changes 2016-08-02 09:31:25 -07:00
Thomas Goyne
b59af706ea Update binding code for API changes 2016-07-18 14:15:25 -07:00
Ari Lazier
3901bf53dc Merge pull request #479 from realm/al-muti-realm
fix for setting properties to objects from other realms
2016-06-13 14:44:28 -07:00
Scott Kyle
cd20d870dd Fix crash from querying with object from another Realm 2016-06-09 15:32:37 -07:00
Scott Kyle
cd0bb079b7 Implement objectForPrimaryKey() method
Resolves #328
2016-06-03 16:51:32 -07:00
Mark Rowe
344fc42d4e Avoid copying Object unnecessarily. 2016-05-31 15:54:43 -07:00
Ari Lazier
fd25afe214 add isValid methods to results and list 2016-05-16 16:01:14 -07:00
Ari Lazier
6af98acd11 combine other classes 2016-05-16 15:43:46 -07:00
Ari Lazier
e76cb3b905 combine class definitions and implementations for list and results 2016-05-16 15:43:46 -07:00
Scott Kyle
8ff23b5411 Fix build issues on Android
GCC was more strict with how we handled some types.
2016-04-18 18:30:55 -07:00
Scott Kyle
1ca5a43982 Revert TValue to ValueType, etc. 2016-04-18 12:18:13 -07:00
Scott Kyle
d57483c675 Rename js_object.hpp -> js_realm_object.hpp 2016-04-18 01:14:48 -07:00
Scott Kyle
10f08747e7 Rename remained camelCase to snake_case
And fix some minor build warnings along the way.
2016-04-18 01:01:04 -07:00
Scott Kyle
7c97a1752e Remove need for BaseClassDefinition 2016-04-16 16:46:16 -07:00
Ari Lazier
bd4088ce91 key templates off explicitly defined classes rather than the internal type 2016-04-15 13:47:01 -07:00
Ari Lazier
e8ca5ff92e ObjectClass -> ClassDefinition 2016-04-15 10:50:15 -07:00
Ari Lazier
c817ac7eac create -> create_instance 2016-04-14 11:19:01 -07:00
Ari Lazier
0b2a75bdc3 use different naming convention for extracted template types 2016-04-14 10:54:43 -07:00
Scott Kyle
c0c65ad620 Make all JSC tests pass again 2016-04-13 03:21:18 -07:00
Scott Kyle
05c432deb1 WIP Node support
The JS engine details are mostly abstracted away. This breaks JSC support until the rest of the pieces are in place. The Node version builds and runs, but crashes when creating a Realm object.
2016-04-12 11:53:30 -07:00
Karson Miller
5e9333b699 no message 2016-02-18 15:30:44 -08:00
Scott Kyle
5332131c14 Add sorted() method to List 2016-02-18 13:41:11 -08:00
Ari Lazier
1d01a1db73 don't copy query unnecessarily 2016-02-17 20:48:27 -08:00