RealmSectionedResult

public protocol RealmSectionedResult : ThreadConfined, Equatable, RandomAccessCollection

RealmSectionedResult defines properties and methods which are common between SectionedResults and ResultSection.

  • Key

    Undocumented

    Declaration

    Swift

    associatedtype Key : _Persistable, Hashable

Properties

  • The Realm which manages the collection, or nil if the collection is invalidated.

    Declaration

    Swift

    var realm: Realm? { get }
  • Indicates if the collection can no longer be accessed.

    The collection can no longer be accessed if invalidate() is called on the Realm that manages the collection.

    Declaration

    Swift

    var isInvalidated: Bool { get }
  • The number of objects in the collection.

    Declaration

    Swift

    var count: Int { get }
  • Returns true if this collection is frozen

    Declaration

    Swift

    var isFrozen: Bool { get }
  • Returns a frozen (immutable) snapshot of this collection.

    The frozen copy is an immutable collection which contains the same data as this collection currently contains, but will not update when writes are made to the containing Realm. Unlike live collections, frozen collections can be accessed from any thread.

    Warning

    This method cannot be called during a write transaction, or when the containing Realm is read-only.

    Warning

    Holding onto a frozen collection for an extended period while performing write transaction on the Realm may result in the Realm file growing to large sizes. See Realm.Configuration.maximumNumberOfActiveVersions for more information.

    Declaration

    Swift

    func freeze() -> Self
  • Returns a live (mutable) version of this frozen collection.

    This method resolves a reference to a live copy of the same frozen collection. If called on a live collection, will return itself.

    Declaration

    Swift

    func thaw() -> Self?