Skip to content

Commit

Permalink
Update doc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsenko committed Sep 15, 2023
1 parent a38e82f commit abaa322
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/src/realm_class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ class Realm implements Finalizable {
return object;
}

/// TODO
/// Ingest an [AsymmetricObject] to the [Realm].
///
/// Ingesting is a write only operation. The ingested object will be dead immediately
/// after commit, but still transferred to the backend when possible.
void ingest<T extends AsymmetricObject>(T object) {
final metadata = _metadata.getByType(object.runtimeType);
final handle = _createObject(object, metadata, false);
Expand Down
10 changes: 9 additions & 1 deletion lib/src/realm_object.dart
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,15 @@ mixin RealmObject on RealmObjectBase implements RealmObjectMarker {}
/// @nodoc
mixin EmbeddedObject on RealmObjectBase implements EmbeddedObjectMarker {}

/// @nodoc
/// Base for any object that can be persisted in a [Realm], but cannot be retrieved,
/// hence cannot be modified.
///
/// The benefit of using [AsymmetricObject] is that synchronization is one-way, and
/// thus performs much better. However, they cannot be queried, or retrieved
/// locally, which limits their use-cases greatly.
///
/// Use [AsymmetricObject] when you have a write-/only use case. You use it by
/// parsing [ObjectType.asymmetricObject] to the [RealmModel] annotation.
mixin AsymmetricObject on RealmObjectBase implements AsymmetricObjectMarker {}

extension EmbeddedObjectExtension on EmbeddedObject {
Expand Down

0 comments on commit abaa322

Please sign in to comment.