YapDatabaseRelationship

@interface YapDatabaseRelationship : YapDatabaseExtension

Welcome to YapDatabase!

The project page has a wealth of documentation if you have any questions. https://github.com/yapstudios/YapDatabase

If you’re new to the project you may want to visit the wiki. https://github.com/yapstudios/YapDatabase/wiki

The YapDatabaseRelationship extension allow you to create relationships between objects, and configure automatic deletion rules.

For tons of information about this extension, see the wiki article: https://github.com/yapstudios/YapDatabase/wiki/Relationships

  • Undocumented

    Declaration

    Objective-C

    - (id)init;

    Swift

    init()
  • Undocumented

    Declaration

    Objective-C

    - (id)initWithVersionTag:(nullable NSString *)versionTag;

    Swift

    init(versionTag: String?)
  • Undocumented

    Declaration

    Objective-C

    - (id)initWithVersionTag:(nullable NSString *)versionTag options:(nullable YapDatabaseRelationshipOptions *)options;

    Swift

    init(versionTag: String?, options: YapDatabaseRelationshipOptions?)
  • The versionTag assists in making changes to the extension or any objects that implement YapDatabaseRelationshipNode.

    For example, say you have existing objects that implement the YapDatabaseRelationshipNode protocol. And you decide to add additional relationship connections from within the yapDatabaseRelationshipEdges method of some of your objects. All you have to do is change the versionTag. And next time you run the app, the YapDatabaseRelationship extension will notice the different versionTag, and will then automatically remove all protocol edges from the database, and automatically repopulate its list of protocol edges by enumerating the nodes in the database.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull versionTag;

    Swift

    var versionTag: String { get }
  • The options that were used to initialize the instance.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        YapDatabaseRelationshipOptions *_Nonnull options;

    Swift

    @NSCopying var options: YapDatabaseRelationshipOptions { get }