Realm.oi new database for mobile apps
Transcript of Realm.oi new database for mobile apps
…because!!Realm is not built on SQLite
Multi-platform (OS X, iOS, Java)
Objective-C and Swift support
A much simpler API
Easy thread-safety
F-F-Fast!! Realm offers extraordinary performance compared to SQLite and other persistence solutions.
File size 20% less
Property types
BOOL, bool, int, NSInteger, long, long long, float, double, CGFloat, NSString, NSDate, and NSData.
RLMObject
RLMArray<Object>
Realm ignores Objective-C property attributes
QueriesThe comparison operators ==, <=, <, >=, >, !=, and BETWEEN are supported for int, long, long long, float, double, and NSDate property types.
Realm supports the following compound operators: “AND”, “OR”, and “NOT”. Such as name BEGINSWITH ‘J’ AND age >= 32
ANY comparisons, such as ANY student.age < 21
Case insensitive comparisons for strings, such as name CONTAINS[c] ‘Ja’. Note that only characters “A-Z” and “a-z” will be ignored for case.
The containment operand IN such as name IN {‘Lisa’, ‘Spike’, ‘Hachi’}
General LimitsClass names must be between 0 and 63 bytes in length
Property names must be between 0 and 63 bytes in length
NSData properties cannot hold data exceeding 16MB in size.
Any single Realm file cannot be larger than the amount of memory your application would be allowed
Other limits
Realm in CocoaPods does not work for Swift projects
KVO is not supported
Fine-grained notifications are not yet supported
Realm Object Setters & Getters cannot be overriden
Realm files cannot be accessed by concurrent processes
Realm http://realm.io/
MagicalRecord https://github.com/magicalpanda/MagicalRecord
Predicates Programming Guide from Apple