反應母語
class Dog {}
Dog.schema = {
name: 'Dog',
properties: {
name: 'string',
age: 'int',
}
};
let realm = new Realm();
realm.write(() => {
realm.create('Dog', {name: 'Rex', age: 1});
});
let pups = realm.objects('Dog').filtered('age > 2');