mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-05 03:03:50 +00:00
remove logic for table name determination from cocoa
This commit is contained in:
parent
4b82701a9e
commit
a82805548e
@ -303,3 +303,13 @@ bool ObjectStore::update_realm_with_schema(realm::Group *group,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ObjectStore::Schema ObjectStore::schema_from_group(Group *group) {
|
||||||
|
ObjectStore::Schema schema;
|
||||||
|
for (unsigned long i = 0; i < group->size(); i++) {
|
||||||
|
string object_type = object_type_for_table_name(group->get_table_name(i));
|
||||||
|
if (object_type.length()) {
|
||||||
|
schema.push_back(ObjectSchemaRef(new ObjectSchema(group, object_type)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return schema;
|
||||||
|
}
|
||||||
|
@ -53,6 +53,9 @@ namespace realm {
|
|||||||
// get a table for an object type
|
// get a table for an object type
|
||||||
static realm::TableRef table_for_object_type(Group *group, StringData object_type);
|
static realm::TableRef table_for_object_type(Group *group, StringData object_type);
|
||||||
|
|
||||||
|
// get existing Schema from a group
|
||||||
|
static Schema schema_from_group(Group *group);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// set a new schema version
|
// set a new schema version
|
||||||
static void set_schema_version(Group *group, uint64_t version);
|
static void set_schema_version(Group *group, uint64_t version);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user