Comenzando con el reino

Rápido

Crear clase de objeto:

class Dog: Object {
    dynamic var name = ""
    dynamic var age = 0
}   

Asignar valores de objetos:

let dog = Dog()
dog.name = "Rex"
dog.age = 1

Guardar objeto:

let realm = try! Realm()
try! realm.write {
    realm.add(dog)
}

Objetos de lectura:

let realm = try! Realm()
let pups = realm.objects(Dog.self)

Filtrado de objetos:

let realm = try! Realm()
let filteredPups = realm.objects(Dog.self).filter("age < 2")

Contar objetos:

let realm = try! Realm()
let pupsCount = realm.objects(Dog.self).count

Reaccionar nativo

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');

##Java public class Dog extends RealmObject { public String name; public int age; }

Dog dog = new Dog();
dog.name = "Rex";
dog.age = 1;

Realm realm = Realm.getDefaultInstance();
realm.executeTransaction(new Realm.Transaction() {
    @Override
    public void execute(Realm realm) {
        realm.copyToRealmOrUpdate(dog);
    }
});

RealmResults<Dog> pups = realm.where(Dog.class)
                               .lessThan("age", 2)
                               .findAll();

C objetivo

@interface Dog : RLMObject
@property NSString *name;
@property NSInteger age;
@end
@implementation Dog
@end

Dog *dog = [Dog new];
dog.name = @"Rex";
dog.age = 1;

RLMRealm *realm = [RLMRealm defaultRealm];
[realm transactionWithBlock:^{
    [realm addObject:dog];
}];

RLMResults<Dog *> *allDogs = [Dog allObjects];
RLMResults<Dog *> *pups = [allDogs objectsWhere:@"age < 2"];

Xamarin

public class Dog : RealmObject 
{
    public string Name { get; set; }
    public int Age { get; set; }
}

var realm = Realm.GetInstance();
realm.Write(() => 
{
    var mydog = realm.CreateObject<Dog>();
    mydog.Name = "Rex";
    mydog.Age = 1;
});

var pups = realm.All<Dog>().Where(d => d.Age < 2);