Commit Graph

1257 Commits

Author SHA1 Message Date
Thomas Goyne 8d10a65088 Make Schema constructable from initializer lists
This enables the following syntax for defining object schemas, which is useful for writing tests:

    Schema schema = {
        {"origin", "", {
            {"array", PropertyTypeArray, "target"}
        }},
        {"target", "", {
            {"prop1", PropertyTypeInt},
            {"prop2", PropertyTypeFloat},
        }},
    };
2016-01-22 11:55:05 -08:00
Nabil Hachicha 707ca1d3c3 Merge branch 'al-android-example' of https://github.com/realm/realm-js into al-android-example 2016-01-22 18:06:18 +00:00
Nabil Hachicha d60ed6c15a exporting tests to junit format to be used by jenkins 2016-01-22 18:05:34 +00:00
Ari Lazier b76766eb63 change package/app name from Demo to ReactNative Test App 2016-01-21 14:36:50 -08:00
Thomas Goyne 0e08e05238 Only set REALM_DEBUG for debug builds 2016-01-21 13:56:41 -08:00
Ari Lazier fe4abff106 delete files in the correct place 2016-01-21 12:37:03 -08:00
Scott Kyle 7f25ed7897 Delegate a couple ListView methods 2016-01-21 11:44:33 -08:00
Scott Kyle 5772717dee Update ReactExample to use our new ListView
It's also been updated to follow best practices with how to properly use the ListView data source.
2016-01-21 11:41:38 -08:00
Scott Kyle eb4ac0000b Efficient React ListView for Realm collections
This component is fully backwards compatible with the original React ListView, but is compatible with Realm Results and List objects to use their snapshot functionality along with more efficiently checking if each row should update.
2016-01-21 11:41:38 -08:00
Scott Kyle 58ef90dc53 Only call size() when actually needed
This would unfortunately result in adverse performance side effects because calling size() can be expensive.
2016-01-21 11:41:38 -08:00
Thomas Goyne 9d1a3da411 Add the required preprocessor flags for using core 2016-01-21 11:06:23 -08:00
Thomas Goyne 62a729fbfd Add headers to CMakeLists 2016-01-21 11:06:14 -08:00
Ari Lazier a0145df5e4 Merge pull request #202 from realm/sk-example-update
Update ReactExample Xcode Project
2016-01-21 07:28:59 -08:00
Nabil Hachicha bf80fca2c0 Running chrome debug mode request on UI thread + using Facebook SoLoader instead of the Relinker + cleaning dependencies 2016-01-21 13:36:54 +00:00
Thomas Goyne 4b001e1842 Extract some logic to a helper function to avoid recursion in update_schema() 2016-01-20 16:26:30 -08:00
Thomas Goyne 8d7b5d8d08 Remove the tracking of if any changes were made from update_realm_with_schema()
It was no longer actually used for anything since we now check if any changes
are actually needed before calling it (to avoid beginning a write transaction
when not needed).
2016-01-20 16:26:30 -08:00
Thomas Goyne 9c2d4703ed Reshuffle the updating of m_config in Realm::update_schema() 2016-01-20 16:26:30 -08:00
Thomas Goyne 6c25eeb85c Fix race condition in multiprocess schema init
If the schema was initialized by a different process between when the old
schema was read and the write transaction was began, the schema init code would
see the updated schema version but not re-read the schema, resulting in it
thinking that a migration was required when the schema actually matched.
2016-01-20 16:26:29 -08:00
kishikawa katsumi 0bae415718 Read-only Realm should be opened even in immutable directory Realm files in an app bundle should be opened if marked as read-only 2016-01-20 16:25:10 -08:00
Mark Rowe 415bfe4d35 Merge pull request #33 from realm/mar/cmake
Add a CMake build system
2016-01-20 15:48:53 -08:00
Nabil HACHICHA bd379dd376 fixing crash on reload JS 2016-01-20 15:46:27 +00:00
Scott Kyle 1bb335c587 Merge pull request #197 from realm/sk-react-native-0.18
Update React Tests to support React Native 0.18
2016-01-19 15:12:51 -08:00
Scott Kyle afade2530c Make ReactExample look decent on Android as well
Mission (mostly) Accomplished!
2016-01-19 15:10:19 -08:00
Ari Lazier b3530a43ff use make_unique with gcc4.9 2016-01-19 13:12:24 -08:00
Mark Rowe 1ff80797ed Add information on using the build system to the README. 2016-01-19 10:55:07 -08:00
Ari Lazier c4d5b9f5cc merge latest object store 2016-01-19 10:51:43 -08:00
Mark Rowe fbb386a735 Improve things a little for Linux. 2016-01-19 10:41:25 -08:00
Mark Rowe 548701c2fd Remove a bogus forward-declaration. 2016-01-19 10:41:25 -08:00
Mark Rowe 9d43f8952e Rework `download_realm_core` to avoid re-downloading core on clean builds. 2016-01-19 10:41:25 -08:00
Mark Rowe c4191d8af6 Hook the parser tests into the CMake build system. 2016-01-19 10:41:25 -08:00
Mark Rowe 9cf26ed2cb Add an initial pass at a CMake-based build system.
It currently creates a dynamic library, and builds on OS X only.
2016-01-19 10:41:25 -08:00
Ari Lazier dd2c87c3b7 Merge pull request #29 from realm/al-js-fixes
Outstanding ObjectStore changes from the JS branch
2016-01-19 10:32:58 -08:00
Scott Kyle 92df9bff8c Update to React Native 0.18.0 official release 2016-01-18 23:01:14 -08:00
Scott Kyle 79229cbce3 Delete old JS file 2016-01-15 16:39:32 -08:00
Scott Kyle 337f8d7650 Remove realm dependency in realm-tests
This caused an error with NPM v3 and was not necessary for us to have.
2016-01-15 16:24:53 -08:00
Ari Lazier 9edafe09ac example fixes 2016-01-15 12:54:46 -08:00
Ari Lazier 5f2a51727b merge in build system improvements 2016-01-15 12:46:58 -08:00
Ari Lazier 1bb05b0fae Merge branch 'al-refactor-broken' of https://github.com/realm/realm-js into al-refactor-broken 2016-01-15 12:35:12 -08:00
Ari Lazier a086955a8c path/name fixes 2016-01-15 12:34:51 -08:00
Nabil HACHICHA ac51a2b2cf rm unused file 2016-01-15 20:20:28 +00:00
Ari Lazier c6e46b9856 remove unneded dependencies 2016-01-15 11:49:22 -08:00
Nabil Hachicha 62017c1739 fix example deps
remove unnecessary requires

reduce dependencies for test projects

using the patched Facebook React Native repo as a dependency

remvoe unecessary/duplicate folder

remove unused dir

remove unused gradle tasks + unecessary duplicate deps

more gradle conf/dependencies cleanup
2016-01-15 16:32:48 +00:00
Scott Kyle c488fecbc2 Update ReactExample to use right JS build
For the simulator it will use the packager, but on device it will use the bundled JS build.
2016-01-15 02:02:43 -08:00
Scott Kyle 804a980d93 Update ReactExample iOS project to latest template
It now will bundle the JS so it can be run on device.
2016-01-15 01:51:59 -08:00
Scott Kyle e4866c5560 Update ReactExample Xcode project
Added libReact as a target dependency since that seemed to workaround a very weird build issue that would come and go.
2016-01-15 01:33:34 -08:00
Scott Kyle 2f1eca4a9c Merge branch 'master' into al-android-example
* master:
  Fix typo in README
  Improve clarity of schema parsing and serialization
  Add test that checks schema validation
  Update README with new Schema API
  Cleanup some code and comments to make it consistent
  Convert tests to create objects with property objects
  Update example apps with new schema API
  Remove confusion between propTypes and objectTypes
  Simplify object schema info returned from RPC
  RPC now keeps object keys in the same order
  Change schema API to take properties as an object
  Add method to clear mutation listeners in RPC client
  Plug small leak from not releasing a JSStringRef
  Make RJSStringForValue use consistent exception style
  Improve error messages inside RJSUtil
2016-01-14 15:39:45 -08:00
Scott Kyle b82997efc0 Fix typo in README 2016-01-14 15:23:17 -08:00
Scott Kyle bc77077b13 Merge branch 'sk-schema-api'
* sk-schema-api:
  Improve clarity of schema parsing and serialization
  Add test that checks schema validation
  Update README with new Schema API
  Cleanup some code and comments to make it consistent
  Convert tests to create objects with property objects
  Update example apps with new schema API
  Remove confusion between propTypes and objectTypes
  Simplify object schema info returned from RPC
  RPC now keeps object keys in the same order
  Change schema API to take properties as an object
  Add method to clear mutation listeners in RPC client
  Plug small leak from not releasing a JSStringRef
  Make RJSStringForValue use consistent exception style
  Improve error messages inside RJSUtil
2016-01-14 15:13:33 -08:00
Ari Lazier 0d515d187a remove unnecessary requires 2016-01-14 09:47:39 -08:00
Nabil Hachicha 9daa3aae30 fix example deps 2016-01-14 16:05:20 +00:00