916 Commits

Author SHA1 Message Date
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
Thomas Goyne
87655793b7 Merge pull request #40 from realm/tg/list
Wrap more of LinkView in List
2016-02-16 17:35:58 -08:00
Thomas Goyne
7c350031d6 Merge pull request #37 from realm/tg/index-set-tests
Add IndexSet tests
2016-02-16 10:07:11 -08:00
Thomas Goyne
f5ae1bdf80 Merge pull request #39 from realm/tg/validate-schema-changes
Handle allowed schema changes in the transaction log observer
2016-02-16 10:07:01 -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
Thomas Goyne
a99cbb7b84 Merge pull request #41 from realm/tg/index_of
Remove the Query version of Results::index_of()
2016-02-12 17:37:24 -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
Thomas Goyne
5f5510e170 Remove the Query version of Results::index_of()
It didn't work for queries based on a LinkView because for those the arguments
to count() are indexes in the LinkView rather than table rows, and there's
currently no way to check if a query is based on a LinkView.
2016-02-10 10:52:33 -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
Thomas Goyne
638b4ec35e Actually update the coordinator's copy of the schema 2016-02-08 14:46:42 -08:00
Thomas Goyne
a3dab7e4b1 Add wrappers for platform-specific headers and normalize include paths
Building the objectstore code now only requires adding the root `src` directory
to the include paths.
2016-02-08 14:46:42 -08:00
Nabil Hachicha
49a74e5646 Refactor & formatting code 2016-02-04 18:30:26 +00:00
Thomas Goyne
74eb195e7f Add wrappers for a bunch more LinkView methods 2016-02-03 18:05:56 -08:00
Thomas Goyne
fdc67777bb Make List default constructable 2016-02-03 18:05:56 -08:00
Thomas Goyne
4c5389dbac Return RowExpr from List::get() 2016-02-03 18:05:55 -08:00
Thomas Goyne
8e58fc693c Call verify_attached() from verify_in_transaction() 2016-02-03 18:05:55 -08:00
Thomas Goyne
27acf3f109 Fix spelling of verify_in_transaction 2016-02-03 18:05:55 -08:00
Thomas Goyne
9152198962 Change List::realm() to List::get_realm() for consistency 2016-02-03 18:05:55 -08:00
Thomas Goyne
6276266d67 Make List const-correct 2016-02-03 18:05:55 -08:00
Thomas Goyne
1cbbf1958f Check the thread in all of List's methods 2016-02-03 18:05:55 -08:00
Thomas Goyne
243ae32187 Fix incorrect error message 2016-02-03 18:05:55 -08:00
Thomas Goyne
0819f72b1b Remove call to sync_if_needed() on a LinkView 2016-02-03 18:05:55 -08:00
Thomas Goyne
62d573c1d9 Remove std:: from size_t in list.* 2016-02-03 18:05:55 -08:00
Thomas Goyne
356c17ba11 Remove list.hpp's dependency on shared_realm.hpp 2016-02-03 18:05:54 -08:00
Thomas Goyne
07c40b4517 Reformat list.{hpp,cpp} to match core style 2016-02-03 18:05:44 -08: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
Thomas Goyne
ad5db72767 Destroy all notifiers before closing realms in clear_cache() 2016-01-25 17:46:40 -08:00
Thomas Goyne
e557babaad Fix the generic implementation of ExternalCommitHelper 2016-01-25 17:46:39 -08:00
Thomas Goyne
4eb49ce6dc Add a not-very-useful generic CachedRealm implementation 2016-01-25 17:46:39 -08:00
Thomas Goyne
112c778d8e Extract the non-Apple specific parts of CachedRealm to a base class 2016-01-25 17:46:39 -08:00
Thomas Goyne
178c562f2c Add an untested non-Apple ExternalCommitHelper implementation 2016-01-25 17:46:39 -08:00
Thomas Goyne
4c195c92e0 Remove some unused cruft from ExternalCommitHelper 2016-01-25 17:46:39 -08:00
Thomas Goyne
513b3d770c Add a short explanation of CachedRealm 2016-01-25 17:46:39 -08:00
Thomas Goyne
89bd55a535 Actually remove the Realm from the cache when close() is called 2016-01-25 17:46:38 -08:00
Thomas Goyne
9b8a0d5346 Log uncaught exceptions in the notifier thread
By default the thread just silently goes away.
2016-01-25 17:46:38 -08:00
Thomas Goyne
ebfca16d00 Eliminate a config copy when opening Realms 2016-01-25 17:46:38 -08:00
Thomas Goyne
e30e2ff278 Simplify RealmCoordinator::get_coordinator() 2016-01-25 17:46:38 -08:00
Thomas Goyne
7a0c83929f Use an unordered map for the Realm coordinator cache 2016-01-25 17:46:38 -08:00
Thomas Goyne
d6daa052e8 Decouple Realm instance tracking from interprocess notifications 2016-01-25 17:46:38 -08:00