Commit Graph

76 Commits

Author SHA1 Message Date
Mark Rowe 848a5b1c09 Expose an object's internal object ID, and allow fetching an object by its object ID (#1460)
* Expose an object's internal object ID, and allow fetching an object by its object ID
* Throw an exception if methods related to object IDs are used on non-synced Realms.
* Use `std::stoull` to ensure we can return the entire range of possible values.
* Add tests for _objectId() / _objectForObjectId().
* Adding change log
* Skip ObjectIdTests.testSynced for non-Node.
2017-11-08 11:22:59 +01:00
Mark Rowe 718ee3296c Fix how _waitForDownload is treated by the RPC code. 2017-10-11 09:29:53 -07:00
Ashwin Phatak 4bcef8baff Add support for bulk updates (#808) 2017-10-10 16:25:47 +05:30
Kenneth Geisshirt feb59ae859 Partial sync (#1361) 2017-10-02 20:29:36 +02:00
blagoev f4d32eba06 Pr review 2017-10-02 17:10:58 +03:00
blagoev 9fde587211 throw Error object always 2017-10-02 13:29:53 +03:00
blagoev b4bc50aacf Fix error message handling 2017-10-02 11:52:45 +03:00
blagoev b8fc18e7e9 Fix RPC server to include exception message 2017-10-02 11:15:28 +03:00
blagoev 49f65cd4da fix RPC server to handle exceptions in requests and return them as son values 2017-10-01 12:24:23 +03:00
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
blagoev 7e048a9bee Merge pull request #1338 from realm/fix-accountInfo-2.0
Fix account info 2.0
2017-09-28 10:08:47 +03:00
blagoev 3b00719aaa Enable _adminUser in RN debug context 2017-09-28 01:26:20 +03:00
Thomas Goyne cf0f0d127f Align the error thrown for assigning to read-only collection properties 2017-09-26 13:43:01 -07:00
Thomas Goyne 741d19458b Pass negative indices over the RPC bridge rather than special-casing -1 2017-09-26 13:43:01 -07:00
Thomas Goyne d1248b6676 Add RPC handling for the type and optional properties 2017-09-26 13:43:01 -07:00
Thomas Goyne 742ff99003 Use the same error messages in the RPC code as the regular code 2017-09-15 15:00:13 -07:00
astigsen 208aa8ee46 Added support for in-memory realms (#1304)
* Added support for in-memory realms
2017-09-13 20:42:23 +02:00
Ashwin Phatak 532f517ded Add Realm.deleteModel API (#573) 2017-09-12 14:45:36 +05:30
blagoev 43d8f2967f Fix typo 2017-09-11 15:50:44 +03:00
blagoev f8bac2d24a Fix Chrome Debugger for RN 2017-09-11 15:50:44 +03:00
Ashwin Phatak 119cd79e5d Add Realm.deleteFile API (#363) 2017-09-07 10:12:59 +05:30
Kenneth Geisshirt 85fb49b354 Adding methods and property to manually control write transactions (#1216)
* Adding methods and property to manually control write transactions
2017-08-21 17:48:53 +02:00
Kenneth Geisshirt bd28c05936 Add shouldCompactOnLaunch option to configuration (#1209)
* Adding shouldCompactOnLaunch option to configuration
* Adding Realm.compact()
2017-08-18 14:22:29 +02:00
Yavor Georgiev 5dd9264225
Add `Realm.empty` 2017-07-12 13:02:21 +02:00
Marius Rackwitz 9e0a9a3bd3 Add support for accessing linking objects / backlinks (#1101)
* Add support for linkingObjects

* Test linkingObjects

* Borrow names helper from list tests

* include computed properties when serializing the schema for the RN debugger

* add API docs

* review comments

* Expose admin users to JS (#1100)

The JS binding used to conflate `SyncUser::is_admin()` with the user being created by calling `Realm.Sync.User.adminToken()`, but now that we expose a user’s role on the server under `is_admin()` this supposition is no longer correct.

#1097 attempted to fix one such case, but fixing it only uncovered another: in `UserClass<T>::all_users()`.  I’ve gone through all the callsites of `SyncUser::is_admin()` to make sure they don’t assume an admin token user.

* [1.8.3] Bump version

* add linkingObjects method to Realm.Object

* changelog
2017-06-29 11:59:10 +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
Adam Fish 37dba6bb36 Add objectSchema method to Realm Object (#1055)
* Add objectSchema property to Realm Object

* fix
2017-06-20 11:42:43 +02:00
Yavor Georgiev 3e80683ad8 Extract admin status from the refresh token (#1078)
* Extract admin status from the refresh token

Fixes #1063

* wire up rpc
2017-06-17 16:59:15 +02:00
blagoev f4528ae6f5 fix for open async in RN Debug 2017-05-20 09:41:51 +03:00
blagoev cc2e685594 Fix for react-tests in Debug 2017-05-20 09:17:48 +03:00
M 0ec11ce16e rpc.js: removed Buffer.from
There hasn't Buffer Object in react native environment.
2017-02-10 18:28:03 +13:00
M 079a810044 rpc.js: fixed issue: #736 2017-02-10 11:27:44 +13: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
Yavor Georgiev bb0dc575c9 Implement proactive access token refresh (#842)
Closes #840
2017-02-03 16:40:13 +01:00
Yavor Georgiev b2da398559 Fix token refresh and session bugs in chrome debugging (#831) 2017-02-01 23:44:56 +01:00
Yavor Georgiev 9d1d970b1f Sync Session API (#825)
* Add Session class and expose it to JS

* Add error property on the sync config object for the event handler

* tests

* refactor access token refresh

* chrome debugging
2017-02-01 14:18:59 +01:00
Yavor Georgiev 408f5588f8 Add Permissions models and User Management Realm API (#824)
* Add Permissions models and User Management Realm API

* docs and changelog

* fix bad merge

* add test

* fix jsdoc annotation

* rename permissions to management schema
2017-01-31 22:56:09 +01:00
Kristian Dupont 0c9c5ac407 Add missing chrome debugging apis for Sync.User (#801)
* Add user tests

* Add Sync member to Realm

* Add a simple test for addListener

* Introduce browser User class

* Introduce Sync.User proxy

* Fix User.all

* Add User.logout

* Remove some console.log statements

* Update rpc.cpp from tests-folder

* Use user.current from user-methods, not cpp

* remove user.current from two missing places

* Start server in realmjs and react tests

* Add user tests

* Add Sync member to Realm

* Add a simple test for addListener

* Introduce browser User class

* Introduce Sync.User proxy

* Fix User.all

* Add User.logout

* Remove some console.log statements

* Update rpc.cpp from tests-folder

* Use user.current from user-methods, not cpp

* remove user.current from two missing places

* Start server in realmjs and react tests

* Replace needle with node-fetch

* Make AuthError work in the browser

* Allow for persistent callbacks

* Expose _authenticateRealm to native

* Use clear_test_state in roc

* Streamline test inclusion

* Fix login tests

* Promisify testLogin()

* Disable AsyncTests for now

* Mode jasmine timeout to spec/unit_tests.js

* Avoid use of global for fetch module

* Only include user-tests is sync is enabled

* Skip ROS for android tests

* Add some comments about persistent callbacks

* Fix results-test

* Run async-tests in node

* Add a comment about (user object)

* Cache all users in User.current and return promises in fetch

* node_require async-tests so RN doesn't try and package them

* Add missing parenthesis
2017-01-31 14:07:29 +01:00
Yavor Georgiev 12bde1ed35 Improve CI builds relying on Chrome (#796)
* Use ES6 Proxies to implement collections in the Chrome debugger

* rework realm-test-names event

* move React stuff on the CPH mac mini

* use node with npm3

* remove debugging aid code
2017-01-11 18:22:41 +01:00
Ari Lazier fcf04bf7f5 add non-working listener methods 2016-11-22 07:27:58 -08:00
Søren Vind 06d277aacd Bumped version of ESLint, added eslinting of specs, make all linting pass 2016-11-14 10:48:50 -08:00
Scott Kyle 717d6781a1 Add support for debugging in Visual Studio Code
Since Code runs in Node, rather than Chrome, we need to require the `sync-request` module. The global `__debug__` object was exposed by the vscode-react-native plugin v0.1.5 for us to be able to do that.

Resolves #374
2016-06-29 16:02:50 -07:00
Scott Kyle 5b9fbbb0ac Remove unnecessary cross-Realm check in rpc
This was causing the new failure in Chrome debug mode in the `testLinkTypesPropertySetters` test.
2016-06-14 16:58:05 -07:00
Scott Kyle 3307bf0a26 Fix for changed error message 2016-06-14 16:57:39 -07:00
Scott Kyle cdcb99a502 Improvements from PR feedback 2016-06-09 13:07:05 -07:00
Scott Kyle cd0bb079b7 Implement objectForPrimaryKey() method
Resolves #328
2016-06-03 16:51:32 -07:00
Ari Lazier 9c7292acff chrome debug and and react native fixes 2016-05-19 13:27:36 -07:00
Ari Lazier e7b341dfdb merge latest from master 2016-05-13 15:05:19 -07:00
Ari Lazier 9c1b923797 fixes for test app 2016-05-13 13:05:39 -07:00