counts of records matching a query on a databse of 200k records (higher is be;er) SQLite libraries Realm SQLite FMDB Core Data Couchbase Lite YapDatabase 0.066 0.069 1 13.6 13.6 30.9 40 30 20 10 0
over all records matching a query (higher is be9er) SQLite libraries Realm SQLite FMDB Core Data Couchbase Lite YapDatabase 0.06 0.07 2 13 14 31 40 30 20 10 0
results.addNotificationBlock { changes in switch changes { case .initial: // … case .update(_, let deletions, let insertions, let modifications): // … case .error(let error): // … } }
in if oldSchemaVersion < 1 {/* Updates go here */} }) Realm.Configuration.defaultConfiguration = config let realm = try! Realm() realm will detect the changes automa9cally Simple migraCon
config = Realm.Configuration(syncConfiguration: SyncConfiguration(user: user, realmURL: syncServerURL)) // Open the remote Realm let realm = try! Realm(configuration: config) // Any changes made to this Realm will be synced across all devices ConfiguraCon