329 Commits

Author SHA1 Message Date
Tim Anglade
7cc2f69736 Merge pull request #264 from realm/km-js-fixlicense
License update
2016-02-21 18:56:59 -08:00
Nabil Hachicha
9bcebfaf29 PR feedback 2016-02-19 22:50:30 +00:00
Nabil Hachicha
76981229ab start debug server only on when using chrome debug 2016-02-19 19:05:07 +00:00
Scott Kyle
2e3a3b5db8 Merge pull request #257 from realm/sk-schema-prop
The schema property should be directly on constructor
2016-02-18 16:27:47 -08:00
Karson Miller
5e9333b699 no message 2016-02-18 15:30:44 -08:00
Scott Kyle
a661350e59 Merge branch 'sk-sorted-results'
* sk-sorted-results:
  Add sorted() method to List
  Further improve argument checking for sorted()
  Improve error message in sorted() method
  Change sortedBy API as discussed
  Allow sortedBy to accept array of properties
  Change sortByProperty to return new Results
2016-02-18 15:21:35 -08:00
Scott Kyle
5b2e7b37af Add script to update version in package.json and iOS
This uses agvtool to update the CURRENT_PROJECT_VERSION and DYLIB_CURRENT_VERSION project variables. The Info.plist files have been updated to propagate this value.
2016-02-18 13:58:12 -08:00
Scott Kyle
5332131c14 Add sorted() method to List 2016-02-18 13:41:11 -08:00
Scott Kyle
d847fbceb1 Further improve argument checking for sorted() 2016-02-18 12:55:54 -08:00
Scott Kyle
bd766297ef Improve error message in sorted() method 2016-02-18 12:50:44 -08:00
Scott Kyle
05d84b23a2 Change sortedBy API as discussed
If provided an array, then each member can optionally be an array of [propName, reverse]
2016-02-18 12:47:18 -08:00
Scott Kyle
76865d0da4 Allow sortedBy to accept array of properties
It now optionally accepts an array of properties for both parameters and the tests have been updated to reflect new capabilities.
2016-02-18 11:58:39 -08:00
Scott Kyle
249bcd8f3f Change sortByProperty to return new Results
The method name changed to sortedBy to reflect that it returns a new Results object and to be more succinct. Also, the second optional argument instead reflects descending (or rather, reverse) since it's an anti-pattern to have an optional argument default to true in JS, and this also follows precedences set by other JS libraries and by Python's sorted function.
2016-02-18 11:58:39 -08:00
Scott Kyle
b34e52b290 The schema property should be directly on constructor
The constructor is now also called with `this` set as the constructed object.

Fixes #232
2016-02-18 11:10:02 -08:00
Ari Lazier
b3486c0d0e final fixes 2016-02-17 20:51:03 -08:00
Ari Lazier
1d01a1db73 don't copy query unnecessarily 2016-02-17 20:48:27 -08:00
Ari Lazier
e578b05058 pr feedback 2016-02-17 20:39:29 -08:00
Ari Lazier
6d02614eaa add List.filtered 2016-02-17 20:24:08 -08:00
Ari Lazier
e91ef42ebb add filtered method 2016-02-17 20:06:42 -08:00
Ari Lazier
98951f52ac Merge pull request #244 from realm/al-benchmarks
Benchmarks
2016-02-17 13:15:47 -08:00
Scott Kyle
3e1889d342 Merge branch 'master' into sk-listview-merge
* master: (207 commits)
  Convert to using new React Native MainActivity template
  Create RealmReactPackage for our Android plugin
  Fix doc for Android
  NPM ignore react-native/android folder
  Skip building Android module under Xcode
  Skip building Android module for iOS tests
  gitignore Android downloads folder
  Update README with instructions to run on Android
  Use un-patched RN for Android by installing hook into JSC
  cleanup build system
  Use Realm in node_modules for ReactTests on Android
  Change Demo => ReactTests
  adding a 'publishAndroid' task to generate the AAR with prebuilt .so files
  Adjust POM_NAME
  Use consistent package naming
  Remove old Demo files
  Add copyright to JNI file
  Cleanup platform.hpp
  Make our Android module buildable as a dependency
  Add `npm test` command
  ...
2016-02-15 14:49:31 -08:00
Ari Lazier
01f92ed72f start of benchmarks
fixes

enumeration test and test setup

add async store api tests

Log benchmark test errors and some other minor edits

Only delete .realm* files for tests

sql lite tests

run all the tests

worthless

Make SQLite benchmarks work

Make Realm insertion benchmark work like SQLite

run each test in release multiple times

Open each database once per benchmark test

Use same AppDelegate for benchmarks as the example

This will load the non-dev JS from the packager.

Make the benchmarks actually match their labels

Delete benchmark databases during setup phase

Some minor code style updates to benchmarks

query tests

make query test mostly work

bug fix and improved logging

remove double insertions

improved logging and bugfix

better logging

batch insersions

more reasonable counts

android
2016-02-15 13:02:25 -08:00
Scott Kyle
6e4b2440ba Create RealmReactPackage for our Android plugin
Also renamed RealmReactAndroid to RealmReactModule to match the convention used by everyone else.
2016-02-12 09:49:11 -08:00
Scott Kyle
415b45be51 Use un-patched RN for Android by installing hook into JSC
This works by installing some assembly into JSGlobalContextCreateInGroup() that will immediately jump out into our own wrapper function so we always can inject the Realm constructor into the context.
2016-02-11 11:14:09 -08:00
Scott Kyle
5f02dc9f6d Add copyright to JNI file 2016-02-08 15:56:08 -08:00
Scott Kyle
8e80733409 Cleanup platform.hpp 2016-02-08 15:55:52 -08:00
Nabil Hachicha
49a74e5646 Refactor & formatting code 2016-02-04 18:30:26 +00:00
Nabil Hachicha
e5ee6d8e9c fixes #209 download core in gradle task 2016-01-30 18:26:27 +00:00
Nabil Hachicha
b92a281b5e add missing refactored files 2016-01-28 15:11:33 +00:00
Nabil Hachicha
1e4c905cdc Change package name fixes #204 2016-01-28 15:09:36 +00:00
Scott Kyle
a6715d210d Ignore more things when publishing with NPM
Unfortunately some kind of NPM bug is making it ignore a top-level .npmignore file.
2016-01-22 16:43:53 -08:00
Ari Lazier
fe4abff106 delete files in the correct place 2016-01-21 12:37:03 -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
Nabil HACHICHA
bd379dd376 fixing crash on reload JS 2016-01-20 15:46:27 +00:00
Ari Lazier
b3530a43ff use make_unique with gcc4.9 2016-01-19 13:12:24 -08:00
Ari Lazier
c4d5b9f5cc merge latest object store 2016-01-19 10:51:43 -08:00
Ari Lazier
5f2a51727b merge in build system improvements 2016-01-15 12:46:58 -08:00
Ari Lazier
c6e46b9856 remove unneded dependencies 2016-01-15 11:49:22 -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
1922125ab0 Improve clarity of schema parsing and serialization 2016-01-13 14:53:39 -08:00
Ari Lazier
63ffc760bd merge latest from master 2016-01-13 12:46:07 -08:00
Ari Lazier
1ded2e661b log levels 2016-01-13 11:50:19 -08:00
Ari Lazier
b45948eb9a only start webserver in chrome debug mode 2016-01-13 11:32:29 -08:00
Ari Lazier
a9ef54d65d chrome debugging 2016-01-13 11:18:10 -08:00
Ari Lazier
570607fa86 instantiate and make calls to rpc server 2016-01-13 11:07:54 -08:00
Nabil Hachicha
55bde66ef8 adding NanoHTTP server for chrome debug 2016-01-13 17:56:38 +00:00
Nabil Hachicha
27bae32361 Merge branch 'al-android-aar' of https://github.com/realm/realm-js into al-android-aar 2016-01-12 19:41:24 +00:00
Ari Lazier
ced472b47e fix for last test 2016-01-12 08:16:13 -08:00
Nabil Hachicha
8c80b42748 Merge branch 'al-android-aar' of https://github.com/realm/realm-js into al-android-aar 2016-01-12 10:27:16 +00:00
Nabil Hachicha
2d8dddabee revert getConstants to avoid initialising Realm too late 2016-01-12 10:25:53 +00:00