-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: API design
-
None
-
3
-
85
-
Kotlin Beta sprint 12, Kotlin Beta sprint 13
We need to figure out how the Schema should be exposed to users.
In Realm Java we right now have RealmSchema and RealmObjectSchema classes, which are used by both Realm and DynamicRealm.
This is a bit confusing as some mutator methods on RealmSchema throw when accessed from Realm but not from Realm Object.
Instead, I would propose we encode the difference in the type system through 4 classes
- class RealmSchema (immutable)
- class RealmObjectSchema (immutable)
- class MutableRealmSchema() : RealmSchema (mutable)
- class MutableRealmObjectSchema: RealmObjcetSchema (mutable)
This way the difference is visible in the type system.
TODO
- Investigate if the above is feasible.
- If yes, define the API surface for each class.
- If no, figure out how the API then should look like
- is depended on by
-
RKOTLIN-150 Story: MVP Schema API
- Closed