Update to latest objectstore master and core/sync

This commit is contained in:
Thomas Goyne 2017-08-29 15:24:16 -07:00
parent a012f84cca
commit 4a926278ad
6 changed files with 15 additions and 5 deletions

View File

@ -60,6 +60,7 @@
"src/object-store/src/impl/collection_notifier.cpp",
"src/object-store/src/impl/list_notifier.cpp",
"src/object-store/src/impl/object_notifier.cpp",
"src/object-store/src/impl/primitive_list_notifier.cpp",
"src/object-store/src/impl/realm_coordinator.cpp",
"src/object-store/src/impl/results_notifier.cpp",
"src/object-store/src/impl/transact_log_handler.cpp",

View File

@ -1,5 +1,5 @@
PACKAGE_NAME=realm-js
VERSION=2.0.0-rc4
REALM_CORE_VERSION=3.0.0-rc3
REALM_SYNC_VERSION=2.0.0-rc12
REALM_CORE_VERSION=3.0.0-rc5
REALM_SYNC_VERSION=2.0.0-rc15
REALM_OBJECT_SERVER_VERSION=2.0.0-rc2

View File

@ -34,6 +34,7 @@ LOCAL_SRC_FILES += src/object-store/src/impl/collection_change_builder.cpp
LOCAL_SRC_FILES += src/object-store/src/impl/collection_notifier.cpp
LOCAL_SRC_FILES += src/object-store/src/impl/list_notifier.cpp
LOCAL_SRC_FILES += src/object-store/src/impl/object_notifier.cpp
LOCAL_SRC_FILES += src/object-store/src/impl/primitive_list_notifier.cpp
LOCAL_SRC_FILES += src/object-store/src/impl/realm_coordinator.cpp
LOCAL_SRC_FILES += src/object-store/src/impl/results_notifier.cpp
LOCAL_SRC_FILES += src/object-store/src/impl/transact_log_handler.cpp

View File

@ -116,6 +116,14 @@ public:
}
}
bool is_same_list(realm::List const& list, ValueType const& value) const noexcept {
auto object = Value::validated_to_object(m_ctx, value);
if (js::Object<JSEngine>::template is_instance<ListClass<JSEngine>>(m_ctx, object)) {
return list == *get_internal<JSEngine, ListClass<JSEngine>>(object);
}
return false;
}
bool allow_missing(ValueType const&) const noexcept { return false; }
void will_change(realm::Object&, realm::Property const&) { }
void did_change() { }

View File

@ -391,7 +391,7 @@ void RealmClass<T>::constructor(ContextType ctx, ObjectType this_object, size_t
static const String read_only_string = "readOnly";
ValueType read_only_value = Object::get_property(ctx, object, read_only_string);
if (!Value::is_undefined(ctx, read_only_value) && Value::validated_to_boolean(ctx, read_only_value, "readOnly")) {
config.schema_mode = SchemaMode::ReadOnly;
config.schema_mode = SchemaMode::Immutable;
}
static const String schema_string = "schema";
@ -619,7 +619,7 @@ void RealmClass<T>::get_in_memory(ContextType ctx, ObjectType object, ReturnValu
template<typename T>
void RealmClass<T>::get_read_only(ContextType ctx, ObjectType object, ReturnValue &return_value) {
return_value.set(get_internal<T, RealmClass<T>>(object)->get()->config().read_only());
return_value.set(get_internal<T, RealmClass<T>>(object)->get()->config().immutable());
}
template<typename T>

@ -1 +1 @@
Subproject commit 7574b3a9bcaa6259b25853e31cd4fd8dccf93b50
Subproject commit 048619e9f53a34ee7b5aa21b38026b8e145e463c