Extensions

The following extensions are available globally.

  • List<T> is the container type in Realm used to define to-many relationships.

    Lists hold a single Object subclass (T) which defines the type of the list.

    Lists can be filtered and sorted with the same predicates as Results<T>.

    When added as a property on Object models, the property must be declared as let and cannot be dynamic.

    See more

    Declaration

    Swift

    public final class List<T : Object> : ListBase
  • Initializes a Realm.Configuration, suitable for creating new Realm instances.

    See more

    Declaration

    Swift

    public final class Realm
  • Results is an auto-updating container type in Realm returned from object queries.

    Results can be queried with the same predicates as List<T> and you can chain queries to further filter query results.

    Results cannot be created directly.

    See more

    Declaration

    Swift

    public final class Results<T : Object> : ResultsBase
  • A SortDescriptor stores a property name and a sort order for use with sorted(sortDescriptors:). It is similar to NSSortDescriptor, but supports only the subset of functionality which can be efficiently run by Realm’s query engine.

    See more

    Declaration

    Swift

    public struct SortDescriptor