Revert "Exposing a Realms groups compute_aggregated_byte_size via `computeSize`"

This reverts commit 10c127542b.
This commit is contained in:
Kenneth Geisshirt 2018-06-28 10:37:39 +02:00
parent 12b8e9030a
commit 9fcf3f20ee
1 changed files with 0 additions and 11 deletions

View File

@ -237,7 +237,6 @@ public:
static void delete_model(ContextType, ObjectType, Arguments, ReturnValue &);
static void object_for_object_id(ContextType, ObjectType, Arguments, ReturnValue&);
static void privileges(ContextType, ObjectType, Arguments, ReturnValue&);
static void compute_size(ContextType, ObjectType, Arguments, ReturnValue&);
// properties
static void get_empty(ContextType, ObjectType, ReturnValue &);
@ -296,7 +295,6 @@ public:
{"writeCopyTo", wrap<writeCopyTo>},
{"deleteModel", wrap<delete_model>},
{"privileges", wrap<privileges>},
{"computeSize", wrap<compute_size>},
{"_objectForObjectId", wrap<object_for_object_id>},
#if REALM_ENABLE_SYNC
{"_waitForDownload", wrap<wait_for_download_completion>},
@ -1178,14 +1176,5 @@ void RealmClass<T>::privileges(ContextType ctx, ObjectType this_object, Argument
return_value.set(object);
}
template<typename T>
void RealmClass<T>::compute_size(ContextType ctx, ObjectType this_object, Arguments args, ReturnValue &return_value) {
args.validate_maximum(0);
SharedRealm realm = *get_internal<T, RealmClass<T>>(this_object);
auto size = realm->read_group().compute_aggregated_byte_size();
return_value.set(Value::from_number(ctx, size));
}
} // js
} // realm