ARRAY -> LIST

This commit is contained in:
Ari Lazier 2015-09-30 10:51:04 -07:00
parent 97b8742278
commit 8ca8a24913
4 changed files with 6 additions and 6 deletions

View File

@ -28,7 +28,7 @@ var TodoListSchmea = {
name: 'TodoList',
properties: [
{name: 'name', type: Realm.Types.STRING},
{name: 'items', type: Realm.Types.ARRAY, objectType: 'Todo'}
{name: 'items', type: Realm.Types.LIST, objectType: 'Todo'}
]
};

View File

@ -90,7 +90,7 @@ static inline Property RJSParseProperty(JSContextRef ctx, JSObjectRef propertyOb
prop.object_type = RJSValidatedStringProperty(ctx, propertyObject, objectTypeString);
prop.is_nullable = true;
}
else if (type == "PropTypesARRAY") {
else if (type == "PropTypesLIST") {
prop.type = PropertyTypeArray;
prop.object_type = RJSValidatedStringProperty(ctx, propertyObject, objectTypeString);
}

View File

@ -36,7 +36,7 @@ JSClassRef RJSRealmTypeClass() {
{ "DATE", RJSTypeGet, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "DATA", RJSTypeGet, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "OBJECT", RJSTypeGet, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "ARRAY", RJSTypeGet, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "LIST", RJSTypeGet, NULL, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ NULL, NULL, NULL, 0 }
};
realmTypesDefinition.staticValues = types;

View File

@ -55,7 +55,7 @@ var LinkTypesObjectSchema = {
properties: [
{name: 'objectCol', type: 'TestObject'},
{name: 'objectCol1', type: Realm.Types.OBJECT, objectType: 'TestObject'},
{name: 'arrayCol', type: Realm.Types.ARRAY, objectType: 'TestObject'},
{name: 'arrayCol', type: Realm.Types.LIST, objectType: 'TestObject'},
]
};
@ -81,7 +81,7 @@ var AllTypesObjectSchema = {
{name: 'dateCol', type: Realm.Types.DATE},
{name: 'dataCol', type: Realm.Types.DATA},
{name: 'objectCol', type: 'TestObject'},
{name: 'arrayCol', type: Realm.Types.ARRAY, objectType: 'TestObject'},
{name: 'arrayCol', type: Realm.Types.LIST, objectType: 'TestObject'},
]
};
@ -97,7 +97,7 @@ var DefaultValuesObjectSchema = {
{name: 'dataCol', type: Realm.Types.DATA, default: 'defaultData'},
{name: 'objectCol', type: 'TestObject', default: [1]},
{name: 'nullObjectCol', type: 'TestObject', default: null},
{name: 'arrayCol', type: Realm.Types.ARRAY, objectType: 'TestObject', default: [[2]]},
{name: 'arrayCol', type: Realm.Types.LIST, objectType: 'TestObject', default: [[2]]},
]
};