motion-yapper 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +3 -1
- data/lib/yapper.rb +3 -3
- data/lib/yapper/db.rb +61 -4
- data/lib/yapper/document/persistence.rb +4 -0
- data/lib/yapper/document/selection.rb +13 -0
- data/lib/yapper/version.rb +1 -1
- data/motion-yapper.gemspec +1 -1
- data/spec/integration/search_spec.rb +111 -0
- data/vendor/Podfile.lock +11 -7
- data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.bridgesupport +16 -2
- data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.h +10 -7
- data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.m +20 -2
- metadata +19 -297
- data/vendor/Pods/.build/libPods-CocoaLumberjack.a +0 -0
- data/vendor/Pods/.build/libPods-NSData+MD5Digest.a +0 -0
- data/vendor/Pods/.build/libPods-YapDatabase.a +0 -0
- data/vendor/Pods/.build/libPods.a +0 -0
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDASLLogger.h +0 -41
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDAbstractDatabaseLogger.h +0 -102
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDContextFilterLogFormatter.h +0 -63
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDDispatchQueueLogFormatter.h +0 -128
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDFileLogger.h +0 -369
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog+LOGV.h +0 -99
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog.h +0 -634
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDMultiFormatter.h +0 -30
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDTTYLogger.h +0 -181
- data/vendor/Pods/BuildHeaders/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
- data/vendor/Pods/BuildHeaders/YapDatabase/NSDictionary+YapDatabase.h +0 -8
- data/vendor/Pods/BuildHeaders/YapDatabase/YapCache.h +0 -91
- data/vendor/Pods/BuildHeaders/YapDatabase/YapCollectionKey.h +0 -23
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabase.h +0 -547
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnection.h +0 -449
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnectionState.h +0 -29
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseDefaults.h +0 -37
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtension.h +0 -15
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionConnection.h +0 -11
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionPrivate.h +0 -444
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionTransaction.h +0 -11
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredView.h +0 -81
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewConnection.h +0 -12
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewPrivate.h +0 -17
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTransaction.h +0 -39
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTypes.h +0 -32
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearch.h +0 -89
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchConnection.h +0 -32
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchPrivate.h +0 -77
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchTransaction.h +0 -68
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseLogging.h +0 -158
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseManager.h +0 -17
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabasePrivate.h +0 -446
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseQuery.h +0 -42
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationship.h +0 -35
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipConnection.h +0 -29
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdge.h +0 -163
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdgePrivate.h +0 -79
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipNode.h +0 -99
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipOptions.h +0 -59
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipPrivate.h +0 -125
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipTransaction.h +0 -384
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndex.h +0 -149
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexConnection.h +0 -33
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexPrivate.h +0 -83
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetup.h +0 -33
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetupPrivate.h +0 -18
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexTransaction.h +0 -58
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseStatement.h +0 -13
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseString.h +0 -121
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseTransaction.h +0 -651
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseView.h +0 -127
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChange.h +0 -272
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChangePrivate.h +0 -94
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewConnection.h +0 -116
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappings.h +0 -842
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappingsPrivate.h +0 -72
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewOptions.h +0 -63
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPage.h +0 -36
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPageMetadata.h +0 -27
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPrivate.h +0 -170
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewRangeOptions.h +0 -330
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewRangeOptionsPrivate.h +0 -17
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTransaction.h +0 -498
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTypes.h +0 -99
- data/vendor/Pods/BuildHeaders/YapDatabase/YapMemoryTable.h +0 -74
- data/vendor/Pods/BuildHeaders/YapDatabase/YapNull.h +0 -17
- data/vendor/Pods/BuildHeaders/YapDatabase/YapSet.h +0 -41
- data/vendor/Pods/BuildHeaders/YapDatabase/YapTouch.h +0 -15
- data/vendor/Pods/CocoaLumberjack/LICENSE.txt +0 -18
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.h +0 -41
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.m +0 -100
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.h +0 -102
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.m +0 -727
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.h +0 -369
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.m +0 -1539
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog+LOGV.h +0 -99
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.h +0 -634
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.m +0 -1208
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.h +0 -181
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.m +0 -1520
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.h +0 -63
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.m +0 -191
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.h +0 -128
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.m +0 -253
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.h +0 -30
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.m +0 -127
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/README.txt +0 -7
- data/vendor/Pods/CocoaLumberjack/README.markdown +0 -74
- data/vendor/Pods/Headers/CocoaLumberjack/DDASLLogger.h +0 -41
- data/vendor/Pods/Headers/CocoaLumberjack/DDAbstractDatabaseLogger.h +0 -102
- data/vendor/Pods/Headers/CocoaLumberjack/DDContextFilterLogFormatter.h +0 -63
- data/vendor/Pods/Headers/CocoaLumberjack/DDDispatchQueueLogFormatter.h +0 -128
- data/vendor/Pods/Headers/CocoaLumberjack/DDFileLogger.h +0 -369
- data/vendor/Pods/Headers/CocoaLumberjack/DDLog+LOGV.h +0 -99
- data/vendor/Pods/Headers/CocoaLumberjack/DDLog.h +0 -634
- data/vendor/Pods/Headers/CocoaLumberjack/DDMultiFormatter.h +0 -30
- data/vendor/Pods/Headers/CocoaLumberjack/DDTTYLogger.h +0 -181
- data/vendor/Pods/Headers/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
- data/vendor/Pods/Headers/YapDatabase/YapCollectionKey.h +0 -23
- data/vendor/Pods/Headers/YapDatabase/YapDatabase.h +0 -547
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseConnection.h +0 -449
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtension.h +0 -15
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionConnection.h +0 -11
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionTransaction.h +0 -11
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredView.h +0 -81
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewConnection.h +0 -12
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTransaction.h +0 -39
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTypes.h +0 -32
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearch.h +0 -89
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchConnection.h +0 -32
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchTransaction.h +0 -68
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseQuery.h +0 -42
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationship.h +0 -35
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipConnection.h +0 -29
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipEdge.h +0 -163
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipNode.h +0 -99
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipOptions.h +0 -59
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipTransaction.h +0 -384
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndex.h +0 -149
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexConnection.h +0 -33
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexSetup.h +0 -33
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexTransaction.h +0 -58
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseTransaction.h +0 -651
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseView.h +0 -127
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewChange.h +0 -272
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewConnection.h +0 -116
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewMappings.h +0 -842
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewOptions.h +0 -63
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewRangeOptions.h +0 -330
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTransaction.h +0 -498
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTypes.h +0 -99
- data/vendor/Pods/Headers/YapDatabase/YapSet.h +0 -41
- data/vendor/Pods/Headers/____Pods-CocoaLumberjack-prefix.h +0 -7
- data/vendor/Pods/Headers/____Pods-NSData+MD5Digest-prefix.h +0 -5
- data/vendor/Pods/Headers/____Pods-YapDatabase-prefix.h +0 -5
- data/vendor/Pods/Headers/____Pods-environment.h +0 -38
- data/vendor/Pods/Manifest.lock +0 -22
- data/vendor/Pods/NSData+MD5Digest/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
- data/vendor/Pods/NSData+MD5Digest/NSData+MD5Digest/NSData+MD5Digest.m +0 -39
- data/vendor/Pods/NSData+MD5Digest/README.md +0 -11
- data/vendor/Pods/Pods-CocoaLumberjack-Private.xcconfig +0 -5
- data/vendor/Pods/Pods-CocoaLumberjack-dummy.m +0 -5
- data/vendor/Pods/Pods-CocoaLumberjack-prefix.pch +0 -7
- data/vendor/Pods/Pods-CocoaLumberjack.xcconfig +0 -0
- data/vendor/Pods/Pods-NSData+MD5Digest-Private.xcconfig +0 -5
- data/vendor/Pods/Pods-NSData+MD5Digest-dummy.m +0 -5
- data/vendor/Pods/Pods-NSData+MD5Digest-prefix.pch +0 -5
- data/vendor/Pods/Pods-NSData+MD5Digest.xcconfig +0 -0
- data/vendor/Pods/Pods-YapDatabase-Private.xcconfig +0 -5
- data/vendor/Pods/Pods-YapDatabase-dummy.m +0 -5
- data/vendor/Pods/Pods-YapDatabase-prefix.pch +0 -5
- data/vendor/Pods/Pods-YapDatabase.xcconfig +0 -1
- data/vendor/Pods/Pods-acknowledgements.markdown +0 -59
- data/vendor/Pods/Pods-acknowledgements.plist +0 -97
- data/vendor/Pods/Pods-dummy.m +0 -5
- data/vendor/Pods/Pods-environment.h +0 -38
- data/vendor/Pods/Pods-resources.sh +0 -68
- data/vendor/Pods/Pods.xcconfig +0 -5
- data/vendor/Pods/Pods.xcodeproj/project.pbxproj +0 -4807
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-CocoaLumberjack.xcscheme +0 -59
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-NSData+MD5Digest.xcscheme +0 -59
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-YapDatabase.xcscheme +0 -59
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods.xcscheme +0 -59
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/xcschememanagement.plist +0 -31
- data/vendor/Pods/YapDatabase/LICENSE.txt +0 -18
- data/vendor/Pods/YapDatabase/README.md +0 -32
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/Internal/YapDatabaseFilteredViewPrivate.h +0 -17
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.h +0 -81
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.m +0 -159
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewConnection.h +0 -12
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewConnection.m +0 -41
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.h +0 -39
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.m +0 -1235
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTypes.h +0 -32
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/Internal/YapDatabaseFullTextSearchPrivate.h +0 -77
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearch.h +0 -89
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearch.m +0 -146
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.h +0 -32
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.m +0 -298
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchSnippetOptions.m +0 -95
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.h +0 -68
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.m +0 -1403
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/Internal/YapDatabaseExtensionPrivate.h +0 -444
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.h +0 -15
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.m +0 -83
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.h +0 -11
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.m +0 -46
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.h +0 -11
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.m +0 -204
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipEdgePrivate.h +0 -79
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipPrivate.h +0 -125
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.h +0 -35
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.m +0 -129
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.h +0 -29
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.m +0 -802
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.h +0 -163
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.m +0 -408
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipNode.h +0 -99
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.h +0 -59
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.m +0 -29
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.h +0 -384
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.m +0 -5254
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexPrivate.h +0 -83
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexSetupPrivate.h +0 -18
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.h +0 -149
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.m +0 -161
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.h +0 -33
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.m +0 -331
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.h +0 -33
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.m +0 -245
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.h +0 -58
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.m +0 -1269
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewChangePrivate.h +0 -94
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewMappingsPrivate.h +0 -72
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPage.h +0 -36
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPage.mm +0 -296
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPageMetadata.h +0 -27
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPageMetadata.m +0 -28
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPrivate.h +0 -170
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewRangeOptionsPrivate.h +0 -17
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.h +0 -272
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.m +0 -2500
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.h +0 -842
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.m +0 -1714
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewRangeOptions.h +0 -330
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewRangeOptions.m +0 -141
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.h +0 -127
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.m +0 -194
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.h +0 -116
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.m +0 -888
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.h +0 -63
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.m +0 -27
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.h +0 -498
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.m +0 -4986
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTypes.h +0 -99
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.h +0 -8
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.m +0 -19
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.h +0 -91
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.m +0 -465
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseConnectionState.h +0 -29
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseConnectionState.m +0 -48
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.h +0 -37
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.m +0 -83
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseLogging.h +0 -158
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseLogging.m +0 -73
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseManager.h +0 -17
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseManager.m +0 -56
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabasePrivate.h +0 -446
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseStatement.h +0 -13
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseStatement.m +0 -26
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseString.h +0 -121
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapMemoryTable.h +0 -74
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapMemoryTable.m +0 -603
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.h +0 -17
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.m +0 -35
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapTouch.h +0 -15
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapTouch.m +0 -31
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.h +0 -23
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.m +0 -199
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.h +0 -42
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.m +0 -96
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapSet.h +0 -41
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapSet.m +0 -82
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.h +0 -547
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.m +0 -2013
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.h +0 -449
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.m +0 -4046
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.h +0 -651
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.m +0 -5602
- data/vendor/Pods/build-iPhoneSimulator/Pods.bridgesupport +0 -3172
- data/vendor/Pods/build-iPhoneSimulator/libPods.a +0 -0
@@ -1,42 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
|
4
|
-
/**
|
5
|
-
* A YapDatabaseQuery is used to pass SQL style queries into various extension classes.
|
6
|
-
* The query that you pass represents everything after the SELECT clause of a query.
|
7
|
-
**/
|
8
|
-
@interface YapDatabaseQuery : NSObject
|
9
|
-
|
10
|
-
/**
|
11
|
-
* A YapDatabaseQuery is everything after the SELECT clause of a query.
|
12
|
-
* Methods that take YapDatabaseQuery parameters will prefix your query string similarly to:
|
13
|
-
*
|
14
|
-
* fullQuery = @"SELECT rowid FROM 'database' " + [yapDatabaseQuery queryString];
|
15
|
-
*
|
16
|
-
* Example 1:
|
17
|
-
*
|
18
|
-
* query = [YapDatabaseQuery queryWithFormat:@"WHERE jid = ?", message.jid];
|
19
|
-
* [secondaryIndex enumerateKeysAndObjectsMatchingQuery:query
|
20
|
-
* usingBlock:^(NSString *key, id object, BOOL *stop){
|
21
|
-
* ...
|
22
|
-
* }];
|
23
|
-
*
|
24
|
-
* Please note that you can ONLY pass objective-c objects as parameters.
|
25
|
-
* Primitive types such as int, float, double, etc are NOT supported.
|
26
|
-
* You MUST wrap these using NSNumber.
|
27
|
-
*
|
28
|
-
* Example 2:
|
29
|
-
*
|
30
|
-
* query = [YapDatabaseQuery queryWithFormat:@"WHERE department = ? AND salary >= ?", dept, @(minSalary)];
|
31
|
-
* [secondaryIndex enumerateKeysAndObjectsMatchingQuery:query
|
32
|
-
* usingBlock:^(NSString *key, id object, BOOL *stop){
|
33
|
-
* ...
|
34
|
-
* }];
|
35
|
-
**/
|
36
|
-
+ (instancetype)queryWithFormat:(NSString *)format, ...;
|
37
|
-
|
38
|
-
|
39
|
-
@property (nonatomic, strong, readonly) NSString *queryString;
|
40
|
-
@property (nonatomic, strong, readonly) NSArray *queryParameters;
|
41
|
-
|
42
|
-
@end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
#import "YapDatabaseExtension.h"
|
4
|
-
|
5
|
-
#import "YapDatabaseRelationshipNode.h"
|
6
|
-
#import "YapDatabaseRelationshipEdge.h"
|
7
|
-
#import "YapDatabaseRelationshipOptions.h"
|
8
|
-
#import "YapDatabaseRelationshipConnection.h"
|
9
|
-
#import "YapDatabaseRelationshipTransaction.h"
|
10
|
-
|
11
|
-
/**
|
12
|
-
* Welcome to YapDatabase!
|
13
|
-
*
|
14
|
-
* The project page has a wealth of documentation if you have any questions.
|
15
|
-
* https://github.com/yaptv/YapDatabase
|
16
|
-
*
|
17
|
-
* If you're new to the project you may want to visit the wiki.
|
18
|
-
* https://github.com/yaptv/YapDatabase/wiki
|
19
|
-
*
|
20
|
-
* The YapDatabaseRelationship extension allow you to create relationships between objects,
|
21
|
-
* and configure automatic deletion rules.
|
22
|
-
*
|
23
|
-
* For tons of information about this extension, see the wiki article:
|
24
|
-
* https://github.com/yaptv/YapDatabase/wiki/Relationships
|
25
|
-
**/
|
26
|
-
|
27
|
-
@interface YapDatabaseRelationship : YapDatabaseExtension
|
28
|
-
|
29
|
-
- (id)init;
|
30
|
-
|
31
|
-
- (id)initWithVersion:(int)version;
|
32
|
-
|
33
|
-
- (id)initWithVersion:(int)version options:(YapDatabaseRelationshipOptions *)options;
|
34
|
-
|
35
|
-
@end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
#import "YapDatabaseExtensionConnection.h"
|
3
|
-
|
4
|
-
@class YapDatabaseRelationship;
|
5
|
-
|
6
|
-
/**
|
7
|
-
* Welcome to YapDatabase!
|
8
|
-
*
|
9
|
-
* The project page has a wealth of documentation if you have any questions.
|
10
|
-
* https://github.com/yaptv/YapDatabase
|
11
|
-
*
|
12
|
-
* If you're new to the project you may want to visit the wiki.
|
13
|
-
* https://github.com/yaptv/YapDatabase/wiki
|
14
|
-
*
|
15
|
-
* The YapDatabaseRelationship extension allow you to create relationships between objects,
|
16
|
-
* and configure automatic deletion rules.
|
17
|
-
*
|
18
|
-
* For tons of information about this extension, see the wiki article:
|
19
|
-
* https://github.com/yaptv/YapDatabase/wiki/Relationships
|
20
|
-
**/
|
21
|
-
|
22
|
-
@interface YapDatabaseRelationshipConnection : YapDatabaseExtensionConnection
|
23
|
-
|
24
|
-
/**
|
25
|
-
* Returns the parent view instance.
|
26
|
-
**/
|
27
|
-
@property (nonatomic, strong, readonly) YapDatabaseRelationship *relationship;
|
28
|
-
|
29
|
-
@end
|
@@ -1,163 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Welcome to YapDatabase!
|
5
|
-
*
|
6
|
-
* The project page has a wealth of documentation if you have any questions.
|
7
|
-
* https://github.com/yaptv/YapDatabase
|
8
|
-
*
|
9
|
-
* If you're new to the project you may want to visit the wiki.
|
10
|
-
* https://github.com/yaptv/YapDatabase/wiki
|
11
|
-
*
|
12
|
-
* The YapDatabaseRelationship extension allow you to create relationships between objects,
|
13
|
-
* and configure automatic deletion rules.
|
14
|
-
*
|
15
|
-
* For tons of information about this extension, see the wiki article:
|
16
|
-
* https://github.com/yaptv/YapDatabase/wiki/Relationships
|
17
|
-
**/
|
18
|
-
|
19
|
-
enum {
|
20
|
-
// notify only
|
21
|
-
YDB_NotifyIfSourceDeleted = 1 << 0,
|
22
|
-
YDB_NotifyIfDestinationDeleted = 1 << 1,
|
23
|
-
|
24
|
-
// one-to-one
|
25
|
-
YDB_DeleteSourceIfDestinationDeleted = 1 << 2,
|
26
|
-
YDB_DeleteDestinationIfSourceDeleted = 1 << 3,
|
27
|
-
|
28
|
-
// one-to-many & many-to-many
|
29
|
-
YDB_DeleteSourceIfAllDestinationsDeleted = 1 << 4,
|
30
|
-
YDB_DeleteDestinationIfAllSourcesDeleted = 1 << 5,
|
31
|
-
};
|
32
|
-
typedef uint16_t YDB_NodeDeleteRules;
|
33
|
-
|
34
|
-
|
35
|
-
@interface YapDatabaseRelationshipEdge : NSObject <NSCoding, NSCopying>
|
36
|
-
|
37
|
-
/**
|
38
|
-
* Returns an edge with the given name, destination & nodeDeleteRules.
|
39
|
-
*
|
40
|
-
* This method is suitable for use with the YapDatabaseRelationshipNode protocol.
|
41
|
-
* When using this protocol, the source object is directly queried by the YapDatabaseRelationship extension.
|
42
|
-
* Thus the extension already knows what the source node is,
|
43
|
-
* and so the source node information (sourceKey & sourceCollection) doesn't need to be explicitly set on the edge.
|
44
|
-
*
|
45
|
-
* This method is not suitable for use with manual edge management.
|
46
|
-
* When manually adding an edge, you must fully specify the source node.
|
47
|
-
**/
|
48
|
-
+ (instancetype)edgeWithName:(NSString *)name
|
49
|
-
destinationKey:(NSString *)destinationKey
|
50
|
-
collection:(NSString *)destinationCollection
|
51
|
-
nodeDeleteRules:(YDB_NodeDeleteRules)rules;
|
52
|
-
|
53
|
-
/**
|
54
|
-
* Returns an edge with the given name, destinationFilePath & nodeDeleteRules.
|
55
|
-
*
|
56
|
-
* When using a destinationFilePath, only a subset of the nodeDeleteRules apply.
|
57
|
-
* Specifically only the following work:
|
58
|
-
* - YDB_DeleteDestinationIfSourceDeleted
|
59
|
-
* - YDB_DeleteDestinationIfAllSourcesDeleted
|
60
|
-
*
|
61
|
-
* This method is suitable for use with the YapDatabaseRelationshipNode protocol.
|
62
|
-
* When using this protocol, the source object is directly queried by the YapDatabaseRelationship extension.
|
63
|
-
* Thus the extension already knows what the source node is,
|
64
|
-
* and so the source node information (sourceKey & sourceCollection) doesn't need to be explicitly set on the edge.
|
65
|
-
*
|
66
|
-
* This method is not suitable for use with manual edge management.
|
67
|
-
* When directly adding an edge, you must fully specify the source node.
|
68
|
-
**/
|
69
|
-
+ (instancetype)edgeWithName:(NSString *)name
|
70
|
-
destinationFilePath:(NSString *)destinationFilePath
|
71
|
-
nodeDeleteRules:(YDB_NodeDeleteRules)rules;
|
72
|
-
|
73
|
-
/**
|
74
|
-
* Returns a fully specified edge.
|
75
|
-
*
|
76
|
-
* This method is suitable for use with manual edge management.
|
77
|
-
*
|
78
|
-
* If you're using the YapDatabaseRelationshipNode protocol, then you can use the shorter version of this method
|
79
|
-
* which doesn't specify the source node. This is because the source node is implied with the
|
80
|
-
* YapDatabaseRelationshipNode protocol, and thus doesn't need to be explicitly specified in the edge.
|
81
|
-
**/
|
82
|
-
+ (instancetype)edgeWithName:(NSString *)name
|
83
|
-
sourceKey:(NSString *)sourceKey
|
84
|
-
collection:(NSString *)sourceCollection
|
85
|
-
destinationKey:(NSString *)destinationKey
|
86
|
-
collection:(NSString *)destinationCollection
|
87
|
-
nodeDeleteRules:(YDB_NodeDeleteRules)rules;
|
88
|
-
|
89
|
-
/**
|
90
|
-
* Returns a fully specified edge.
|
91
|
-
*
|
92
|
-
* When using a destinationFilePath, only a subset of the nodeDeleteRules apply.
|
93
|
-
* Specifically only the following work:
|
94
|
-
* - YDB_DeleteDestinationIfSourceDeleted
|
95
|
-
* - YDB_DeleteDestinationIfAllSourcesDeleted
|
96
|
-
*
|
97
|
-
* This method is suitable for use with manual edge management.
|
98
|
-
*
|
99
|
-
* If you're using the YapDatabaseRelationshipNode protocol, then you can use the shorter version of this method
|
100
|
-
* which doesn't specify the source node. This is because the source node is implied with the
|
101
|
-
* YapDatabaseRelationshipNode protocol, and thus doesn't need to be explicitly specified in the edge.
|
102
|
-
**/
|
103
|
-
+ (instancetype)edgeWithName:(NSString *)name
|
104
|
-
sourceKey:(NSString *)sourceKey
|
105
|
-
collection:(NSString *)sourceCollection
|
106
|
-
destinationFilePath:(NSString *)destinationFilePath
|
107
|
-
nodeDeleteRules:(YDB_NodeDeleteRules)rules;
|
108
|
-
|
109
|
-
#pragma mark Init
|
110
|
-
|
111
|
-
/**
|
112
|
-
* For documentation @see edgeWithName:destinationKey:collection:nodeDeleteRules:
|
113
|
-
**/
|
114
|
-
- (id)initWithName:(NSString *)name
|
115
|
-
destinationKey:(NSString *)key
|
116
|
-
collection:(NSString *)collection
|
117
|
-
nodeDeleteRules:(YDB_NodeDeleteRules)rules;
|
118
|
-
|
119
|
-
/**
|
120
|
-
* For documentation @see edgeWithName:destinationFilePath:nodeDeleteRules:
|
121
|
-
**/
|
122
|
-
- (id)initWithName:(NSString *)name destinationFilePath:(NSString *)destinationFilePath
|
123
|
-
nodeDeleteRules:(YDB_NodeDeleteRules)rules;
|
124
|
-
|
125
|
-
/**
|
126
|
-
* For documentation @see edgeWithName:sourceKey:collection:destinationKey:collection:nodeDeleteRules:
|
127
|
-
**/
|
128
|
-
- (id)initWithName:(NSString *)name
|
129
|
-
sourceKey:(NSString *)sourceKey
|
130
|
-
collection:(NSString *)sourceCollection
|
131
|
-
destinationKey:(NSString *)destinationKey
|
132
|
-
collection:(NSString *)destinationCollection
|
133
|
-
nodeDeleteRules:(YDB_NodeDeleteRules)rules;
|
134
|
-
|
135
|
-
/**
|
136
|
-
* For documentation @see edgeWithName:sourceKey:collection:destinationFilePath:nodeDeleteRules:
|
137
|
-
**/
|
138
|
-
- (id)initWithName:(NSString *)name sourceKey:(NSString *)sourceKey
|
139
|
-
collection:(NSString *)sourceCollection
|
140
|
-
destinationFilePath:(NSString *)destinationFilePath
|
141
|
-
nodeDeleteRules:(YDB_NodeDeleteRules)rules;
|
142
|
-
|
143
|
-
#pragma mark Properties
|
144
|
-
|
145
|
-
@property (nonatomic, copy, readonly) NSString *name;
|
146
|
-
|
147
|
-
@property (nonatomic, copy, readonly) NSString *sourceKey;
|
148
|
-
@property (nonatomic, copy, readonly) NSString *sourceCollection;
|
149
|
-
|
150
|
-
@property (nonatomic, copy, readonly) NSString *destinationKey;
|
151
|
-
@property (nonatomic, copy, readonly) NSString *destinationCollection;
|
152
|
-
|
153
|
-
@property (nonatomic, copy, readonly) NSString *destinationFilePath;
|
154
|
-
|
155
|
-
@property (nonatomic, assign, readonly) YDB_NodeDeleteRules nodeDeleteRules;
|
156
|
-
|
157
|
-
/**
|
158
|
-
* NO if the edge was created via the YapDatabaseRelationshipNode protocol.
|
159
|
-
* YES if the edge was created via "manual edge management" methods.
|
160
|
-
**/
|
161
|
-
@property (nonatomic, assign, readonly) BOOL isManualEdge;
|
162
|
-
|
163
|
-
@end
|
@@ -1,99 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
#import "YapDatabaseRelationshipEdge.h"
|
3
|
-
|
4
|
-
/**
|
5
|
-
* Welcome to YapDatabase!
|
6
|
-
*
|
7
|
-
* The project page has a wealth of documentation if you have any questions.
|
8
|
-
* https://github.com/yaptv/YapDatabase
|
9
|
-
*
|
10
|
-
* If you're new to the project you may want to visit the wiki.
|
11
|
-
* https://github.com/yaptv/YapDatabase/wiki
|
12
|
-
*
|
13
|
-
* The YapDatabaseRelationship extension allow you to create relationships between objects,
|
14
|
-
* and configure automatic deletion rules.
|
15
|
-
*
|
16
|
-
* For tons of information about this extension, see the wiki article:
|
17
|
-
* https://github.com/yaptv/YapDatabase/wiki/Relationships
|
18
|
-
**/
|
19
|
-
|
20
|
-
typedef enum {
|
21
|
-
YDB_SourceNodeDeleted,
|
22
|
-
YDB_DestinationNodeDeleted,
|
23
|
-
} YDB_NotifyReason;
|
24
|
-
|
25
|
-
|
26
|
-
/**
|
27
|
-
* There are 2 techniques you may use to add edges to the relationship graph:
|
28
|
-
*
|
29
|
-
* - Use the YapDatabaseRelationshipNode protocol
|
30
|
-
* - Manually manage the edges by adding / removing them yourself
|
31
|
-
*
|
32
|
-
* You are welcome to use either technique. In fact you can use them both simultaneously.
|
33
|
-
* Which you choose may simply be whichever works best depending on the situation.
|
34
|
-
*
|
35
|
-
* The YapDatabaseRelationshipNode protocol works quite simply:
|
36
|
-
*
|
37
|
-
* Any object that is stored in the database may optionally implement this protocol in order to
|
38
|
-
* specify a list of relationships that apply to it. The object just needs to:
|
39
|
-
* 1.) Add the YapDatabaseRelationshipNode protocol to its declared list of protocols (in header file)
|
40
|
-
* 2.) Implement the yapDatabaseRelationshipEdges method
|
41
|
-
*
|
42
|
-
* When the object is inserted or updated in the database, the YapDatabaseRelationshipExtension will automatically
|
43
|
-
* invoke the yapDatabaseRelationshipEdges method to get the list of edges. It then inserts the list of edges
|
44
|
-
* into the database (if object was inserted), or updates the previously inserted list (if object was updated).
|
45
|
-
*
|
46
|
-
* Typically this protocol is convenient to use if:
|
47
|
-
* - Your objects already contain identifiers that can be used to create the edges you desire
|
48
|
-
* - You'd like to be able to delete objects in the database by simply setting identifier properties to nil
|
49
|
-
*
|
50
|
-
* @see YapDatabaseRelationshipEdge
|
51
|
-
**/
|
52
|
-
@protocol YapDatabaseRelationshipNode <NSObject>
|
53
|
-
@required
|
54
|
-
|
55
|
-
/**
|
56
|
-
* Implement this method in order to return the edges that start from this node.
|
57
|
-
* Note that although edges are directional, the associated rules are bidirectional.
|
58
|
-
*
|
59
|
-
* In terms of edge direction, this object is the "source" of the edge.
|
60
|
-
* And the object at the other end of the edge is called the "destination".
|
61
|
-
*
|
62
|
-
* Every edge also has a name (which can be any string you specify), and a bidirectional rule.
|
63
|
-
* For example, you could specify either of the following:
|
64
|
-
* - delete the destination if I am deleted
|
65
|
-
* - delete me if the destination is deleted
|
66
|
-
*
|
67
|
-
* In fact, you could specify both of those rules simultaneously for a single edge.
|
68
|
-
* And there are similar rules if your graph is one-to-many for this node.
|
69
|
-
*
|
70
|
-
* Thus it is unnecessary to duplicate the edge on the destination node.
|
71
|
-
* So you can pick which node you'd like to create the edge(s) from.
|
72
|
-
* Either side is fine, just pick whichever is easier, or whichever makes more sense for your data model.
|
73
|
-
*
|
74
|
-
* YapDatabaseRelationship supports one-to-one, one-to-many, and even many-to-many relationships.
|
75
|
-
*
|
76
|
-
* Important: This method will not be invoked unless the object implements the protocol.
|
77
|
-
* That is, the object's class declaration must have YapDatabaseRelationshipNode in its listed protocols.
|
78
|
-
*
|
79
|
-
* @interface MyObject : NSObject <YapDatabaseRelationshipNode> // <-- Must be in protocol list
|
80
|
-
*
|
81
|
-
* @see YapDatabaseRelationshipEdge
|
82
|
-
**/
|
83
|
-
- (NSArray *)yapDatabaseRelationshipEdges;
|
84
|
-
|
85
|
-
@optional
|
86
|
-
|
87
|
-
/**
|
88
|
-
* If an edge is deleted due to one of two associated nodes being deleted,
|
89
|
-
* and the edge has a notify rule associated with it (YDB_NotifyIfSourceDeleted or YDB_NotifyIfDestinationDeleted),
|
90
|
-
* then this method may be invoked on the remaining node.
|
91
|
-
*
|
92
|
-
* It doesn't matter which side created the edge (the source or destination side).
|
93
|
-
* If the rule exists, and the remaining side implements this particular
|
94
|
-
**/
|
95
|
-
- (id)yapDatabaseRelationshipEdgeDeleted:(YapDatabaseRelationshipEdge *)edge withReason:(YDB_NotifyReason)reason;
|
96
|
-
|
97
|
-
@end
|
98
|
-
|
99
|
-
|
@@ -1,59 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Welcome to YapDatabase!
|
5
|
-
*
|
6
|
-
* The project page has a wealth of documentation if you have any questions.
|
7
|
-
* https://github.com/yaptv/YapDatabase
|
8
|
-
*
|
9
|
-
* If you're new to the project you may want to visit the wiki.
|
10
|
-
* https://github.com/yaptv/YapDatabase/wiki
|
11
|
-
*
|
12
|
-
* The YapDatabaseRelationship extension allow you to create relationships between objects,
|
13
|
-
* and configure automatic deletion rules.
|
14
|
-
*
|
15
|
-
* For tons of information about this extension, see the wiki article:
|
16
|
-
* https://github.com/yaptv/YapDatabase/wiki/Relationships
|
17
|
-
**/
|
18
|
-
|
19
|
-
@interface YapDatabaseRelationshipOptions : NSObject <NSCopying>
|
20
|
-
|
21
|
-
/**
|
22
|
-
* You can optionally completely disable the YapDatabaseRelationshipProtocol.
|
23
|
-
*
|
24
|
-
* If you don't use it at all (i.e. you manually manage all graph edges),
|
25
|
-
* then disabling the protocol, and its related processing, can reduce overhead.
|
26
|
-
*
|
27
|
-
* The default value is NO.
|
28
|
-
**/
|
29
|
-
@property (nonatomic, assign, readwrite) BOOL disableYapDatabaseRelationshipNodeProtocol;
|
30
|
-
|
31
|
-
/**
|
32
|
-
* You can configure the extension to pre-filter all but a subset of collections.
|
33
|
-
*
|
34
|
-
* The primary motivation for this is to reduce the overhead when populating the graph.
|
35
|
-
* That is, when you first create the relationship extension, it will automatically enumerate all objects
|
36
|
-
* in the database and check to see if any of them implement the YapDatabaseRelationshipNode protocol.
|
37
|
-
* If there is only a single collection which includes objects implementing the YapDatabaseRelationshipNode protoco,
|
38
|
-
* then you could specify that collection here. So when the extension first populates itself,
|
39
|
-
* it will enumerate over just the allowedCollections, as opposed to enumerating over all collections.
|
40
|
-
* And enumerating a small subset of the entire database during graph population can improve speed,
|
41
|
-
* especially with larger databases.
|
42
|
-
*
|
43
|
-
* In addition to reducing the overhead when first populating the graph,
|
44
|
-
* the allowedCollections will pre-filter while you're making changes to the database.
|
45
|
-
* So if you add a new object to the database, and the associated collection isn't in allowedCollections,
|
46
|
-
* then the extension will skip any associated processing that would normally occur. (Things like checking to see
|
47
|
-
* if the object implements the YapDatabaseRelationshipNode protocol, and checking to see if there were previously
|
48
|
-
* any associated protocol edges for the object.)
|
49
|
-
*
|
50
|
-
* For all rows whose collection is in the allowedCollections, the extension works normally.
|
51
|
-
*
|
52
|
-
* Note: If you disable the YapDatabaseRelationshipNode protocol, then this configuration option is ignored
|
53
|
-
* because it already skips all associated processing.
|
54
|
-
*
|
55
|
-
* The default value is nil.
|
56
|
-
**/
|
57
|
-
@property (nonatomic, copy, readwrite) NSSet *allowedCollections;
|
58
|
-
|
59
|
-
@end
|
@@ -1,384 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
#import "YapDatabaseExtensionTransaction.h"
|
4
|
-
#import "YapDatabaseRelationshipEdge.h"
|
5
|
-
|
6
|
-
/**
|
7
|
-
* Welcome to YapDatabase!
|
8
|
-
*
|
9
|
-
* The project page has a wealth of documentation if you have any questions.
|
10
|
-
* https://github.com/yaptv/YapDatabase
|
11
|
-
*
|
12
|
-
* If you're new to the project you may want to visit the wiki.
|
13
|
-
* https://github.com/yaptv/YapDatabase/wiki
|
14
|
-
*
|
15
|
-
* The YapDatabaseRelationship extension allow you to create relationships between objects,
|
16
|
-
* and configure automatic deletion rules.
|
17
|
-
*
|
18
|
-
* For tons of information about this extension, see the wiki article:
|
19
|
-
* https://github.com/yaptv/YapDatabase/wiki/Relationships
|
20
|
-
**/
|
21
|
-
|
22
|
-
@interface YapDatabaseRelationshipTransaction : YapDatabaseExtensionTransaction
|
23
|
-
|
24
|
-
#pragma mark Node Fetch
|
25
|
-
|
26
|
-
/**
|
27
|
-
* Shortcut for fetching the source object for the given edge.
|
28
|
-
* Equivalent to:
|
29
|
-
*
|
30
|
-
* [transaction objectForKey:edge.sourceKey inCollection:edge.sourceCollection];
|
31
|
-
**/
|
32
|
-
- (id)sourceNodeForEdge:(YapDatabaseRelationshipEdge *)edge;
|
33
|
-
|
34
|
-
/**
|
35
|
-
* Shortcut for fetching the destination object for the given edge.
|
36
|
-
* Equivalent to:
|
37
|
-
*
|
38
|
-
* [transaction objectForKey:edge.destinationKey inCollection:edge.destinationCollection];
|
39
|
-
**/
|
40
|
-
- (id)destinationNodeForEdge:(YapDatabaseRelationshipEdge *)edge;
|
41
|
-
|
42
|
-
#pragma mark Enumerate
|
43
|
-
|
44
|
-
/**
|
45
|
-
* Enumerates every edge in the graph with the given name.
|
46
|
-
*
|
47
|
-
* @param name
|
48
|
-
* The name of the edge (case sensitive).
|
49
|
-
**/
|
50
|
-
- (void)enumerateEdgesWithName:(NSString *)name
|
51
|
-
usingBlock:(void (^)(YapDatabaseRelationshipEdge *edge, BOOL *stop))block;
|
52
|
-
|
53
|
-
/**
|
54
|
-
* Enumerates every edge that matches any parameters you specify.
|
55
|
-
* You can specify any combination of the following:
|
56
|
-
*
|
57
|
-
* - name only
|
58
|
-
* - sourceKey & sourceCollection only
|
59
|
-
* - name + sourceKey & sourceCollection
|
60
|
-
*
|
61
|
-
* @param name (optional)
|
62
|
-
* The name of the edge (case sensitive).
|
63
|
-
*
|
64
|
-
* @param sourceKey (optional)
|
65
|
-
* The edge.sourceKey to match.
|
66
|
-
*
|
67
|
-
* @param sourceCollection (optional)
|
68
|
-
* The edge.sourceCollection to match.
|
69
|
-
*
|
70
|
-
* If you pass a non-nil sourceKey, and sourceCollection is nil,
|
71
|
-
* then the sourceCollection is treated as the empty string, just like the rest of the YapDatabase framework.
|
72
|
-
**/
|
73
|
-
- (void)enumerateEdgesWithName:(NSString *)name
|
74
|
-
sourceKey:(NSString *)sourceKey
|
75
|
-
collection:(NSString *)sourceCollection
|
76
|
-
usingBlock:(void (^)(YapDatabaseRelationshipEdge *edge, BOOL *stop))block;
|
77
|
-
|
78
|
-
/**
|
79
|
-
* Enumerates every edge that matches any parameters you specify.
|
80
|
-
* You can specify any combination of the following:
|
81
|
-
*
|
82
|
-
* - name only
|
83
|
-
* - destinationKey & destinationCollection only
|
84
|
-
* - name + destinationKey & destinationCollection
|
85
|
-
*
|
86
|
-
* @param name (optional)
|
87
|
-
* The name of the edge (case sensitive).
|
88
|
-
*
|
89
|
-
* @param destinationKey (optional)
|
90
|
-
* The edge.destinationKey to match.
|
91
|
-
*
|
92
|
-
* @param destinationCollection (optional)
|
93
|
-
* The edge.destinationCollection to match.
|
94
|
-
*
|
95
|
-
* If you pass a non-nil destinationKey, and destinationCollection is nil,
|
96
|
-
* then the destinationCollection is treated as the empty string, just like the rest of the YapDatabase framework.
|
97
|
-
**/
|
98
|
-
- (void)enumerateEdgesWithName:(NSString *)name
|
99
|
-
destinationKey:(NSString *)destinationKey
|
100
|
-
collection:(NSString *)destinationCollection
|
101
|
-
usingBlock:(void (^)(YapDatabaseRelationshipEdge *edge, BOOL *stop))block;
|
102
|
-
|
103
|
-
/**
|
104
|
-
* Enumerates every edge that matches any parameters you specify.
|
105
|
-
* You can specify any combination of the following:
|
106
|
-
*
|
107
|
-
* - name only
|
108
|
-
* - destinationFilePath
|
109
|
-
* - name + destinationFilePath
|
110
|
-
*
|
111
|
-
* @param name (optional)
|
112
|
-
* The name of the edge (case sensitive).
|
113
|
-
*
|
114
|
-
* @param destinationFilePath (optional)
|
115
|
-
* The edge.destinationFilePath to match.
|
116
|
-
**/
|
117
|
-
- (void)enumerateEdgesWithName:(NSString *)name
|
118
|
-
destinationFilePath:(NSString *)destinationFilePath
|
119
|
-
usingBlock:(void (^)(YapDatabaseRelationshipEdge *edge, BOOL *stop))block;
|
120
|
-
|
121
|
-
/**
|
122
|
-
* Enumerates every edge that matches any parameters you specify.
|
123
|
-
* You can specify any combination of the following:
|
124
|
-
*
|
125
|
-
* - name only
|
126
|
-
* - sourceKey & sourceCollection only
|
127
|
-
* - destinationKey & destinationCollection only
|
128
|
-
* - name + sourceKey & sourceCollection
|
129
|
-
* - name + destinationKey & destinationCollection
|
130
|
-
* - name + sourceKey & sourceCollection + destinationKey & destinationCollection
|
131
|
-
*
|
132
|
-
* @param name (optional)
|
133
|
-
* The name of the edge (case sensitive).
|
134
|
-
*
|
135
|
-
* @param sourceKey (optional)
|
136
|
-
* The edge.sourceKey to match.
|
137
|
-
*
|
138
|
-
* @param sourceCollection (optional)
|
139
|
-
* The edge.sourceCollection to match.
|
140
|
-
*
|
141
|
-
* @param destinationKey (optional)
|
142
|
-
* The edge.destinationKey to match.
|
143
|
-
*
|
144
|
-
* @param destinationCollection (optional)
|
145
|
-
* The edge.destinationCollection to match.
|
146
|
-
*
|
147
|
-
* If you pass a non-nil sourceKey, and sourceCollection is nil,
|
148
|
-
* then the sourceCollection is treated as the empty string, just like the rest of the YapDatabase framework.
|
149
|
-
*
|
150
|
-
* If you pass a non-nil destinationKey, and destinationCollection is nil,
|
151
|
-
* then the destinationCollection is treated as the empty string, just like the rest of the YapDatabase framework.
|
152
|
-
**/
|
153
|
-
- (void)enumerateEdgesWithName:(NSString *)name
|
154
|
-
sourceKey:(NSString *)sourceKey
|
155
|
-
collection:(NSString *)sourceCollection
|
156
|
-
destinationKey:(NSString *)destinationKey
|
157
|
-
collection:(NSString *)destinationCollection
|
158
|
-
usingBlock:(void (^)(YapDatabaseRelationshipEdge *edge, BOOL *stop))block;
|
159
|
-
|
160
|
-
/**
|
161
|
-
* Enumerates every edge that matches any parameters you specify.
|
162
|
-
* You can specify any combination of the following:
|
163
|
-
*
|
164
|
-
* - name only
|
165
|
-
* - sourceKey & sourceCollection only
|
166
|
-
* - destinationKey & destinationCollection only
|
167
|
-
* - name + sourceKey & sourceCollection
|
168
|
-
* - name + destinationKey & destinationCollection
|
169
|
-
* - name + sourceKey & sourceCollection + destinationKey & destinationCollection
|
170
|
-
*
|
171
|
-
* @param name (optional)
|
172
|
-
* The name of the edge (case sensitive).
|
173
|
-
*
|
174
|
-
* @param sourceKey (optional)
|
175
|
-
* The edge.sourceKey to match.
|
176
|
-
*
|
177
|
-
* @param sourceCollection (optional)
|
178
|
-
* The edge.sourceCollection to match.
|
179
|
-
*
|
180
|
-
* @param destinationFilePath (optional)
|
181
|
-
* The edge.destinationFilePath to match.
|
182
|
-
*
|
183
|
-
* If you pass a non-nil sourceKey, and sourceCollection is nil,
|
184
|
-
* then the sourceCollection is treated as the empty string, just like the rest of the YapDatabase framework.
|
185
|
-
**/
|
186
|
-
- (void)enumerateEdgesWithName:(NSString *)name
|
187
|
-
sourceKey:(NSString *)sourceKey
|
188
|
-
collection:(NSString *)sourceCollection
|
189
|
-
destinationFilePath:(NSString *)destinationFilePath
|
190
|
-
usingBlock:(void (^)(YapDatabaseRelationshipEdge *edge, BOOL *stop))block;
|
191
|
-
|
192
|
-
#pragma mark Count
|
193
|
-
|
194
|
-
/**
|
195
|
-
* Returns a count of every edge in the graph with the given name.
|
196
|
-
*
|
197
|
-
* @param name
|
198
|
-
* The name of the edge (case sensitive).
|
199
|
-
**/
|
200
|
-
- (NSUInteger)edgeCountWithName:(NSString *)name;
|
201
|
-
|
202
|
-
/**
|
203
|
-
* Returns a count of every edge that matches any parameters you specify.
|
204
|
-
* You can specify any combination of the following:
|
205
|
-
*
|
206
|
-
* - name only
|
207
|
-
* - sourceKey & sourceCollection only
|
208
|
-
* - name + sourceKey & sourceCollection
|
209
|
-
*
|
210
|
-
* @param name (optional)
|
211
|
-
* The name of the edge (case sensitive).
|
212
|
-
*
|
213
|
-
* @param sourceKey (optional)
|
214
|
-
* The edge.sourceKey to match.
|
215
|
-
*
|
216
|
-
* @param sourceCollection (optional)
|
217
|
-
* The edge.sourceCollection to match.
|
218
|
-
*
|
219
|
-
* If you pass a non-nil sourceKey, and sourceCollection is nil,
|
220
|
-
* then the sourceCollection is treated as the empty string, just like the rest of the YapDatabase framework.
|
221
|
-
**/
|
222
|
-
- (NSUInteger)edgeCountWithName:(NSString *)name
|
223
|
-
sourceKey:(NSString *)sourceKey
|
224
|
-
collection:(NSString *)sourceCollection;
|
225
|
-
|
226
|
-
/**
|
227
|
-
* Returns a count of every edge that matches any parameters you specify.
|
228
|
-
* You can specify any combination of the following:
|
229
|
-
*
|
230
|
-
* - name only
|
231
|
-
* - destinationKey & destinationCollection only
|
232
|
-
* - name + destinationKey & destinationCollection
|
233
|
-
*
|
234
|
-
* @param name (optional)
|
235
|
-
* The name of the edge (case sensitive).
|
236
|
-
*
|
237
|
-
* @param destinationKey (optional)
|
238
|
-
* The edge.destinationKey to match.
|
239
|
-
*
|
240
|
-
* @param destinationCollection (optional)
|
241
|
-
* The edge.destinationCollection to match.
|
242
|
-
*
|
243
|
-
* If you pass a non-nil destinationKey, and destinationCollection is nil,
|
244
|
-
* then the destinationCollection is treated as the empty string, just like the rest of the YapDatabase framework.
|
245
|
-
**/
|
246
|
-
- (NSUInteger)edgeCountWithName:(NSString *)name
|
247
|
-
destinationKey:(NSString *)destinationKey
|
248
|
-
collection:(NSString *)destinationCollection;
|
249
|
-
|
250
|
-
/**
|
251
|
-
* Returns a count of every edge that matches any parameters you specify.
|
252
|
-
* You can specify any combination of the following:
|
253
|
-
*
|
254
|
-
* - name only
|
255
|
-
* - destinationFilePath
|
256
|
-
* - name + destinationFilePath
|
257
|
-
*
|
258
|
-
* @param name (optional)
|
259
|
-
* The name of the edge (case sensitive).
|
260
|
-
*
|
261
|
-
* @param destinationFilePath (optional)
|
262
|
-
* The edge.destinationFilePath to match.
|
263
|
-
**/
|
264
|
-
- (NSUInteger)edgeCountWithName:(NSString *)name
|
265
|
-
destinationFilePath:(NSString *)destinationFilePath;
|
266
|
-
|
267
|
-
/**
|
268
|
-
* Returns a count of every edge that matches any parameters you specify.
|
269
|
-
* You can specify any combination of the following:
|
270
|
-
*
|
271
|
-
* - name only
|
272
|
-
* - sourceKey & sourceCollection only
|
273
|
-
* - destinationKey & destinationCollection only
|
274
|
-
* - name + sourceKey & sourceCollection
|
275
|
-
* - name + destinationKey & destinationCollection
|
276
|
-
* - name + sourceKey & sourceCollection + destinationKey & destinationCollection
|
277
|
-
*
|
278
|
-
* @param name (optional)
|
279
|
-
* The name of the edge (case sensitive).
|
280
|
-
*
|
281
|
-
* @param sourceKey (optional)
|
282
|
-
* The edge.sourceKey to match.
|
283
|
-
*
|
284
|
-
* @param sourceCollection (optional)
|
285
|
-
* The edge.sourceCollection to match.
|
286
|
-
*
|
287
|
-
* @param destinationKey (optional)
|
288
|
-
* The edge.destinationKey to match.
|
289
|
-
*
|
290
|
-
* @param destinationCollection (optional)
|
291
|
-
* The edge.destinationCollection to match.
|
292
|
-
*
|
293
|
-
* If you pass a non-nil sourceKey, and sourceCollection is nil,
|
294
|
-
* then the sourceCollection is treated as the empty string, just like the rest of the YapDatabase framework.
|
295
|
-
*
|
296
|
-
* If you pass a non-nil destinationKey, and destinationCollection is nil,
|
297
|
-
* then the destinationCollection is treated as the empty string, just like the rest of the YapDatabase framework.
|
298
|
-
**/
|
299
|
-
- (NSUInteger)edgeCountWithName:(NSString *)name
|
300
|
-
sourceKey:(NSString *)sourceKey
|
301
|
-
collection:(NSString *)sourceCollection
|
302
|
-
destinationKey:(NSString *)destinationKey
|
303
|
-
collection:(NSString *)destinationCollection;
|
304
|
-
|
305
|
-
/**
|
306
|
-
* Returns a count of every edge that matches any parameters you specify.
|
307
|
-
* You can specify any combination of the following:
|
308
|
-
*
|
309
|
-
* - name only
|
310
|
-
* - sourceKey & sourceCollection only
|
311
|
-
* - destinationFilePath
|
312
|
-
* - name + sourceKey & sourceCollection
|
313
|
-
* - name + destinationFilePath
|
314
|
-
* - name + sourceKey & sourceCollection + destinationFilePath
|
315
|
-
*
|
316
|
-
* @param name (optional)
|
317
|
-
* The name of the edge (case sensitive).
|
318
|
-
*
|
319
|
-
* @param sourceKey (optional)
|
320
|
-
* The edge.sourceKey to match.
|
321
|
-
*
|
322
|
-
* @param sourceCollection (optional)
|
323
|
-
* The edge.sourceCollection to match.
|
324
|
-
*
|
325
|
-
* @param destinationFilePath (optional)
|
326
|
-
* The edge.destinationFilePath to match.
|
327
|
-
*
|
328
|
-
* If you pass a non-nil sourceKey, and sourceCollection is nil,
|
329
|
-
* then the sourceCollection is treated as the empty string, just like the rest of the YapDatabase framework.
|
330
|
-
**/
|
331
|
-
- (NSUInteger)edgeCountWithName:(NSString *)name
|
332
|
-
sourceKey:(NSString *)sourceKey
|
333
|
-
collection:(NSString *)sourceCollection
|
334
|
-
destinationFilePath:(NSString *)destinationFilePath;
|
335
|
-
|
336
|
-
@end
|
337
|
-
|
338
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
339
|
-
#pragma mark -
|
340
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
341
|
-
|
342
|
-
@interface YapDatabaseRelationshipTransaction (ReadWrite)
|
343
|
-
|
344
|
-
#pragma mark Manual Edge Management
|
345
|
-
|
346
|
-
/**
|
347
|
-
* There are 2 ways to manage edges (add/remove) using the YapDatabaseRelationship extension:
|
348
|
-
*
|
349
|
-
* - Manual edge management (via the methods below)
|
350
|
-
* - Implement the YapDatabaseRelationshipNode protocol for some of your objects
|
351
|
-
*
|
352
|
-
* For more information, see the wiki section "Edge Creation":
|
353
|
-
*
|
354
|
-
* https://github.com/yaptv/YapDatabase/wiki/Relationships#wiki-edge_creation
|
355
|
-
**/
|
356
|
-
|
357
|
-
/**
|
358
|
-
* The addEdge: method will add the manual edge (if it doesn't already exist).
|
359
|
-
* Otherwise it will replace the the existing manual edge with the same name & srcKey/collection & dstKey/collection.
|
360
|
-
**/
|
361
|
-
- (void)addEdge:(YapDatabaseRelationshipEdge *)edge;
|
362
|
-
|
363
|
-
- (void)removeEdge:(YapDatabaseRelationshipEdge *)edge;
|
364
|
-
|
365
|
-
#pragma mark Force Processing
|
366
|
-
|
367
|
-
/**
|
368
|
-
* The extension automatically processes all changes to the graph at the end of a readwrite transaction.
|
369
|
-
* This allows it to consolidate multiple changes into a single batch,
|
370
|
-
* and also minimizes the impact of cascading delete rules, especially in the case where you'll be deleting
|
371
|
-
* many of the objects manually at some later point within the transaction block.
|
372
|
-
*
|
373
|
-
* However, there may be certain use cases where it is preferable to have the extension execute its rules in advance.
|
374
|
-
* I'm struggling to come up with a really good example, so this semi-convoluted one will have to do:
|
375
|
-
*
|
376
|
-
* You have a parent object, with a bunch of child objects that have edges to the parent.
|
377
|
-
* You need to replace the parent, and for whatever reason the new parent has the same collection/key.
|
378
|
-
* So instead of doing a setObject:forKey:inCollection:, you first delete the original parent.
|
379
|
-
* At that point you can invoke this flush method, and it will properly delete any child objects.
|
380
|
-
* Then you can safely set the new parent, knowing it won't accidentally inherit any children from the old parent.
|
381
|
-
**/
|
382
|
-
- (void)flush;
|
383
|
-
|
384
|
-
@end
|