mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-26 22:39:05 +00:00
remove duplicate code
This commit is contained in:
parent
094192a869
commit
3c6ecf6b65
@ -63,18 +63,3 @@ Property *ObjectSchema::property_for_name(std::string name) {
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
std::vector<ObjectSchema> ObjectSchema::object_schema_from_group(realm::Group *group) {
|
||||
// generate object schema and class mapping for all tables in the realm
|
||||
unsigned long numTables = group->size();
|
||||
vector<ObjectSchema> object_schema;
|
||||
|
||||
for (unsigned long i = 0; i < numTables; i++) {
|
||||
std::string name = ObjectStore::object_type_for_table_name(group->get_table_name(i).data());
|
||||
if (name.length()) {
|
||||
object_schema.push_back(ObjectSchema(group, name));
|
||||
}
|
||||
}
|
||||
|
||||
return object_schema;
|
||||
}
|
||||
|
@ -31,8 +31,6 @@ namespace realm {
|
||||
ObjectSchema() {}
|
||||
ObjectSchema(Group *group, std::string name);
|
||||
|
||||
static std::vector<ObjectSchema> object_schema_from_group(Group *group);
|
||||
|
||||
std::string name;
|
||||
std::vector<Property> properties;
|
||||
std::string primary_key;
|
||||
|
Loading…
x
Reference in New Issue
Block a user