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,63 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Welcome to YapDatabase!
|
5
|
-
*
|
6
|
-
* https://github.com/yaptv/YapDatabase
|
7
|
-
*
|
8
|
-
* The project wiki has a wealth of documentation if you have any questions.
|
9
|
-
* https://github.com/yaptv/YapDatabase/wiki
|
10
|
-
*
|
11
|
-
* YapDatabaseView is an extension designed to work with YapDatabase.
|
12
|
-
* It gives you a persistent sorted "view" of a configurable subset of your data.
|
13
|
-
*
|
14
|
-
* For the full documentation on Views, please see the related wiki article:
|
15
|
-
* https://github.com/yaptv/YapDatabase/wiki/Views
|
16
|
-
**/
|
17
|
-
|
18
|
-
@interface YapDatabaseViewOptions : NSObject <NSCopying>
|
19
|
-
|
20
|
-
/**
|
21
|
-
* A view can either be persistent (saved to sqlite), or non-persistent (kept in memory only).
|
22
|
-
*
|
23
|
-
* A persistent view saves its content to sqlite database tables.
|
24
|
-
* Thus a persistent view can be restored on subsequent app launches with re-population.
|
25
|
-
*
|
26
|
-
* A non-persistent view is stored in memory.
|
27
|
-
* From the outside, it works exactly like a persistent view in every way.
|
28
|
-
* You won't be able to tell the difference unless you look at the sqlite database.
|
29
|
-
*
|
30
|
-
* It's recommended that you use a persistent view for any views that your app needs on a regular basis.
|
31
|
-
* For example, if your app's main screen has a tableView powered by a view, that should likely be persistent.
|
32
|
-
*
|
33
|
-
* Non-persistent views are recommended for those situations where you need a view only temporarily.
|
34
|
-
* Or where the configuration of the view is highly dependent upon parameters that change regularly.
|
35
|
-
* In general, situations where it doesn't really make sense to persist the view.
|
36
|
-
*
|
37
|
-
* The default value is YES.
|
38
|
-
**/
|
39
|
-
@property (nonatomic, assign, readwrite) BOOL isPersistent;
|
40
|
-
|
41
|
-
/**
|
42
|
-
* You can configure the view to pre-filter all but a subset of collections.
|
43
|
-
*
|
44
|
-
* The primary motivation for this is to reduce the overhead when first populating the view.
|
45
|
-
* For example, if you're creating a view which only includes objects from a single collection,
|
46
|
-
* then you could specify that collection here. So when the view first populates itself,
|
47
|
-
* it will enumerate over just the allowedCollections, as opposed to enumerating over all collections.
|
48
|
-
* And enumerating a small subset of the entire database during view population can improve speed,
|
49
|
-
* especially with larger databases.
|
50
|
-
*
|
51
|
-
* In addition to reducing the overhead when first populating the view,
|
52
|
-
* the allowedCollections will pre-filter while you're making changes to the database.
|
53
|
-
* So if you add a new object to the database, and the associated collection isn't in allowedCollections,
|
54
|
-
* then the groupingBlock will never be invoked, and the view will act as if the groupingBlock returned nil.
|
55
|
-
*
|
56
|
-
* For all rows whose collection is in the allowedCollections, the view acts normally.
|
57
|
-
* So the groupingBlock would still be invoked as normal.
|
58
|
-
*
|
59
|
-
* The default value is nil.
|
60
|
-
**/
|
61
|
-
@property (nonatomic, copy, readwrite) NSSet *allowedCollections;
|
62
|
-
|
63
|
-
@end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
#import "YapDatabaseViewOptions.h"
|
2
|
-
|
3
|
-
|
4
|
-
@implementation YapDatabaseViewOptions
|
5
|
-
|
6
|
-
@synthesize isPersistent = isPersistent;
|
7
|
-
@synthesize allowedCollections = allowedCollections;
|
8
|
-
|
9
|
-
- (id)init
|
10
|
-
{
|
11
|
-
if ((self = [super init]))
|
12
|
-
{
|
13
|
-
isPersistent = YES;
|
14
|
-
}
|
15
|
-
return self;
|
16
|
-
}
|
17
|
-
|
18
|
-
- (id)copyWithZone:(NSZone *)zone
|
19
|
-
{
|
20
|
-
YapDatabaseViewOptions *copy = [[YapDatabaseViewOptions alloc] init];
|
21
|
-
copy->isPersistent = isPersistent;
|
22
|
-
copy->allowedCollections = allowedCollections;
|
23
|
-
|
24
|
-
return copy;
|
25
|
-
}
|
26
|
-
|
27
|
-
@end
|
@@ -1,498 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
#import "YapDatabaseExtensionTransaction.h"
|
4
|
-
#import "YapDatabaseViewTypes.h"
|
5
|
-
#import "YapDatabaseViewMappings.h"
|
6
|
-
|
7
|
-
/**
|
8
|
-
* Welcome to YapDatabase!
|
9
|
-
*
|
10
|
-
* The project page has a wealth of documentation if you have any questions.
|
11
|
-
* https://github.com/yaptv/YapDatabase
|
12
|
-
*
|
13
|
-
* If you're new to the project you may want to check out the wiki
|
14
|
-
* https://github.com/yaptv/YapDatabase/wiki
|
15
|
-
*
|
16
|
-
* YapDatabaseView is an extension designed to work with YapDatabase.
|
17
|
-
* It gives you a persistent sorted "view" of a configurable subset of your data.
|
18
|
-
*
|
19
|
-
* For more information, please see the wiki article about Views:
|
20
|
-
* https://github.com/yaptv/YapDatabase/wiki/Views
|
21
|
-
*
|
22
|
-
* You may also wish to consult the documentation in YapDatabaseView.h for information on setting up a view.
|
23
|
-
*
|
24
|
-
* You access this class within a regular transaction.
|
25
|
-
* For example:
|
26
|
-
*
|
27
|
-
* [databaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction){
|
28
|
-
*
|
29
|
-
* topUsaSale = [[transaction ext:@"myView"] objectAtIndex:0 inGroup:@"usa"]
|
30
|
-
* }];
|
31
|
-
*
|
32
|
-
* Keep in mind that the YapDatabaseViewTransaction object is linked to the YapDatabaseReadTransaction object.
|
33
|
-
* So don't try to use it outside the transaction block (cause it won't work).
|
34
|
-
**/
|
35
|
-
@interface YapDatabaseViewTransaction : YapDatabaseExtensionTransaction
|
36
|
-
|
37
|
-
#pragma mark Groups
|
38
|
-
|
39
|
-
/**
|
40
|
-
* Returns the number of groups the view manages.
|
41
|
-
* Each group has one or more keys in it.
|
42
|
-
**/
|
43
|
-
- (NSUInteger)numberOfGroups;
|
44
|
-
|
45
|
-
/**
|
46
|
-
* Returns the names of all groups in an unsorted array.
|
47
|
-
* Each group has one or more keys in it.
|
48
|
-
*
|
49
|
-
* @see YapDatabaseView - groupingBlock
|
50
|
-
**/
|
51
|
-
- (NSArray *)allGroups;
|
52
|
-
|
53
|
-
/**
|
54
|
-
* Returns YES if there are any keys in the given group.
|
55
|
-
* This is equivalent to ([viewTransaction numberOfKeysInGroup:group] > 0)
|
56
|
-
**/
|
57
|
-
- (BOOL)hasGroup:(NSString *)group;
|
58
|
-
|
59
|
-
/**
|
60
|
-
* Returns the total number of keys in the given group.
|
61
|
-
* If the group doesn't exist, returns zero.
|
62
|
-
**/
|
63
|
-
- (NSUInteger)numberOfKeysInGroup:(NSString *)group;
|
64
|
-
|
65
|
-
/**
|
66
|
-
* Returns the total number of keys in every single group.
|
67
|
-
**/
|
68
|
-
- (NSUInteger)numberOfKeysInAllGroups;
|
69
|
-
|
70
|
-
#pragma mark Fetching
|
71
|
-
|
72
|
-
/**
|
73
|
-
* Returns the key & collection at the given index within the given group.
|
74
|
-
* Returns nil if the group doesn't exist, or if the index is out of bounds.
|
75
|
-
**/
|
76
|
-
- (BOOL)getKey:(NSString **)keyPtr
|
77
|
-
collection:(NSString **)collectionPtr
|
78
|
-
atIndex:(NSUInteger)index
|
79
|
-
inGroup:(NSString *)group;
|
80
|
-
|
81
|
-
/**
|
82
|
-
* Shortcut for: [view getKey:&key collection:&collection atIndex:0 inGroup:group]
|
83
|
-
**/
|
84
|
-
- (BOOL)getFirstKey:(NSString **)keyPtr collection:(NSString **)collectionPtr inGroup:(NSString *)group;
|
85
|
-
|
86
|
-
/**
|
87
|
-
* Shortcut for: [view getKey:&key collection:&collection atIndex:(numberOfKeysInGroup-1) inGroup:group]
|
88
|
-
**/
|
89
|
-
- (BOOL)getLastKey:(NSString **)keyPtr collection:(NSString **)collectionPtr inGroup:(NSString *)group;
|
90
|
-
|
91
|
-
/**
|
92
|
-
* Shortcut for fetching just the collection at the given index.
|
93
|
-
**/
|
94
|
-
- (NSString *)collectionAtIndex:(NSUInteger)index inGroup:(NSString *)group;
|
95
|
-
|
96
|
-
/**
|
97
|
-
* Shortcut for fetching just the key at the given index.
|
98
|
-
* Convenient if you already know what collection the key is in.
|
99
|
-
**/
|
100
|
-
- (NSString *)keyAtIndex:(NSUInteger)index inGroup:(NSString *)group;
|
101
|
-
|
102
|
-
/**
|
103
|
-
* If the given {collection, key} are included in the view, then returns the associated group.
|
104
|
-
* If the {collection, key} isn't in the view, then returns nil.
|
105
|
-
**/
|
106
|
-
- (NSString *)groupForKey:(NSString *)key inCollection:(NSString *)collection;
|
107
|
-
|
108
|
-
/**
|
109
|
-
* Fetches both the group and the index within the group for the given {collection, key}.
|
110
|
-
*
|
111
|
-
* Returns YES if the {collection, key} is included in the view.
|
112
|
-
* Otherwise returns NO, and sets the parameters to nil & zero.
|
113
|
-
**/
|
114
|
-
- (BOOL)getGroup:(NSString **)groupPtr
|
115
|
-
index:(NSUInteger *)indexPtr
|
116
|
-
forKey:(NSString *)key
|
117
|
-
inCollection:(NSString *)collection;
|
118
|
-
|
119
|
-
#pragma mark Finding
|
120
|
-
|
121
|
-
typedef id YapDatabaseViewFindBlock; // One of the YapDatabaseViewFindX types below.
|
122
|
-
|
123
|
-
typedef NSComparisonResult (^YapDatabaseViewFindWithKeyBlock) \
|
124
|
-
(NSString *collection, NSString *key);
|
125
|
-
typedef NSComparisonResult (^YapDatabaseViewFindWithObjectBlock) \
|
126
|
-
(NSString *collection, NSString *key, id object);
|
127
|
-
typedef NSComparisonResult (^YapDatabaseViewFindWithMetadataBlock) \
|
128
|
-
(NSString *collection, NSString *key, id metadata);
|
129
|
-
typedef NSComparisonResult (^YapDatabaseViewFindWithRowBlock) \
|
130
|
-
(NSString *collection, NSString *key, id object, id metadata);
|
131
|
-
|
132
|
-
/**
|
133
|
-
* This method uses a binary search algorithm to find a range of items within the view that match the given criteria.
|
134
|
-
* For example:
|
135
|
-
*
|
136
|
-
* You have a view which sorts items by timestamp (oldest to newest)
|
137
|
-
* You could then use this method to quickly find all items whose timestamp falls on a certain day.
|
138
|
-
* Or, more generally, within a certain timespan.
|
139
|
-
*
|
140
|
-
* NSDate *beginningOfMonday = ... // Monday at 12:00 AM
|
141
|
-
* NSDate *beginningOfTuesday = ... // Tuesday at 12:00 AM
|
142
|
-
*
|
143
|
-
* YapDatabaseViewBlockType blockType = YapDatabaseViewBlockTypeWithObject;
|
144
|
-
* YapDatabaseViewFindWithObjectBlock block = ^(NSString *key, id object){
|
145
|
-
*
|
146
|
-
* Purchase *purchase = (Purchase *)object;
|
147
|
-
*
|
148
|
-
* if ([purchase.timestamp compare:beginningOfMonday] == NSOrderedAscending) // earlier than start range
|
149
|
-
* return NSOrderedAscending;
|
150
|
-
*
|
151
|
-
* if ([purchase.timestamp compare:beginningOfTuesday] == NSOrderedAscending) // earlier than end range
|
152
|
-
* return NSOrderedSame;
|
153
|
-
*
|
154
|
-
* return NSOrderedDescending; // greater than end range (or exactly midnight on tuesday)
|
155
|
-
* };
|
156
|
-
*
|
157
|
-
* The return values from the YapDatabaseViewFindBlock have the following meaning:
|
158
|
-
*
|
159
|
-
* - NSOrderedAscending : The given row (block parameters) is less than the range I'm looking for.
|
160
|
-
* That is, the row would have a smaller index within the view than would the range I seek.
|
161
|
-
*
|
162
|
-
* - NSOrderedDecending : The given row (block parameters) is greater than the range I'm looking for.
|
163
|
-
* That is, the row would have a greater index within the view than would the range I seek.
|
164
|
-
*
|
165
|
-
* - NSOrderedSame : The given row (block parameters) is within the range I'm looking for.
|
166
|
-
*
|
167
|
-
* Keep in mind 2 things:
|
168
|
-
*
|
169
|
-
* #1 : This method can only be used if you need to find items according to their sort order.
|
170
|
-
* That is, according to how the items are sorted via the view's sortingBlock.
|
171
|
-
* Attempting to use this method in any other manner makes no sense.
|
172
|
-
*
|
173
|
-
* #2 : The findBlock that you pass needs to be setup in the same manner as the view's sortingBlock.
|
174
|
-
* That is, the following rules must be followed, or the results will be incorrect:
|
175
|
-
*
|
176
|
-
* For example, say you have a view like this, looking for the following range of 3 items:
|
177
|
-
* myView = @[ A, B, C, D, E, F, G ]
|
178
|
-
* ^^^^^^^
|
179
|
-
* sortingBlock(A, B) => NSOrderedAscending
|
180
|
-
* findBlock(A) => NSOrderedAscending
|
181
|
-
*
|
182
|
-
* sortingBlock(E, D) => NSOrderedDescending
|
183
|
-
* findBlock(E) => NSOrderedDescending
|
184
|
-
*
|
185
|
-
* findBlock(B) => NSOrderedSame
|
186
|
-
* findBlock(C) => NSOrderedSame
|
187
|
-
* findBlock(D) => NSOrderedSame
|
188
|
-
*
|
189
|
-
* In other words, you can't sort one way in the sortingBlock, and "sort" another way in the findBlock.
|
190
|
-
* Another way to think about it is in terms of how the Apple docs define the NSOrdered enums:
|
191
|
-
*
|
192
|
-
* NSOrderedAscending : The left operand is smaller than the right operand.
|
193
|
-
* NSOrderedDescending : The left operand is greater than the right operand.
|
194
|
-
*
|
195
|
-
* For the findBlock, the "left operand" is the row that is passed,
|
196
|
-
* and the "right operand" is the desired range.
|
197
|
-
*
|
198
|
-
* And NSOrderedSame means: "the passed row is within the range I'm looking for".
|
199
|
-
*
|
200
|
-
* Implementation Note:
|
201
|
-
* This method uses a binary search to find an item for which the block returns NSOrderedSame.
|
202
|
-
* It then uses information from the first binary search (known min/max) to perform two subsequent binary searches.
|
203
|
-
* One to find the start of the range, and another to find the end of the range.
|
204
|
-
* Thus:
|
205
|
-
* - the implementation is efficient
|
206
|
-
* - the block won't be invoked for every item within the range
|
207
|
-
*
|
208
|
-
* @param group
|
209
|
-
* The group within the view to search.
|
210
|
-
*
|
211
|
-
* @param block
|
212
|
-
* One of the YapDatabaseViewFindWithXBlock types.
|
213
|
-
*
|
214
|
-
* @param blockType
|
215
|
-
* The proper YapDatabaseViewBlockTypeWithX type that matches the given block.
|
216
|
-
*
|
217
|
-
* @return
|
218
|
-
* If found, the range that matches the items within the desired range.
|
219
|
-
* That is, is these items were passed to the given block, the block would return NSOrderedSame.
|
220
|
-
* If not found, returns NSMakeRange(NSNotFound, 0).
|
221
|
-
**/
|
222
|
-
- (NSRange)findRangeInGroup:(NSString *)group
|
223
|
-
usingBlock:(YapDatabaseViewFindBlock)block
|
224
|
-
blockType:(YapDatabaseViewBlockType)blockType;
|
225
|
-
|
226
|
-
#pragma mark Enumerating
|
227
|
-
|
228
|
-
/**
|
229
|
-
* Enumerates the keys in the given group.
|
230
|
-
**/
|
231
|
-
- (void)enumerateKeysInGroup:(NSString *)group
|
232
|
-
usingBlock:(void (^)(NSString *collection, NSString *key, NSUInteger index, BOOL *stop))block;
|
233
|
-
|
234
|
-
/**
|
235
|
-
* Enumerates the keys in the given group.
|
236
|
-
* Reverse enumeration is supported by passing NSEnumerationReverse. (No other enumeration options are supported.)
|
237
|
-
**/
|
238
|
-
- (void)enumerateKeysInGroup:(NSString *)group
|
239
|
-
withOptions:(NSEnumerationOptions)options
|
240
|
-
usingBlock:(void (^)(NSString *collection, NSString *key, NSUInteger index, BOOL *stop))block;
|
241
|
-
|
242
|
-
/**
|
243
|
-
* Enumerates the keys in the range of the given group.
|
244
|
-
* Reverse enumeration is supported by passing NSEnumerationReverse. (No other enumeration options are supported.)
|
245
|
-
**/
|
246
|
-
- (void)enumerateKeysInGroup:(NSString *)group
|
247
|
-
withOptions:(NSEnumerationOptions)options
|
248
|
-
range:(NSRange)range
|
249
|
-
usingBlock:(void (^)(NSString *collection, NSString *key, NSUInteger index, BOOL *stop))block;
|
250
|
-
|
251
|
-
@end
|
252
|
-
|
253
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
254
|
-
#pragma mark -
|
255
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
256
|
-
|
257
|
-
@interface YapDatabaseViewTransaction (ReadWrite)
|
258
|
-
|
259
|
-
/**
|
260
|
-
* "Touching" a object allows you to mark an item in the view as "updated",
|
261
|
-
* even if the object itself wasn't directly updated.
|
262
|
-
*
|
263
|
-
* This is most often useful when a view is being used by a tableView,
|
264
|
-
* but the tableView cells are also dependent upon another object in the database.
|
265
|
-
*
|
266
|
-
* For example:
|
267
|
-
*
|
268
|
-
* You have a view which includes the departments in the company, sorted by name.
|
269
|
-
* But as part of the cell that's displayed for the department,
|
270
|
-
* you also display the number of employees in the department.
|
271
|
-
* The employee count comes from elsewhere.
|
272
|
-
* That is, the employee count isn't a property of the department object itself.
|
273
|
-
* Perhaps you get the count from another view,
|
274
|
-
* or perhaps the count is simply the number of keys in a particular collection.
|
275
|
-
* Either way, when you add or remove an employee, you want to ensure that the view marks the
|
276
|
-
* affected department as updated so that the corresponding cell will properly redraw itself.
|
277
|
-
*
|
278
|
-
* So the idea is to mark certain items as "updated" (in terms of this view) so that
|
279
|
-
* the changeset for the view will properly reflect a change to the corresponding index.
|
280
|
-
* But you don't actually need to update the item on disk.
|
281
|
-
* This is exactly what "touch" does.
|
282
|
-
*
|
283
|
-
* Touching an item has very minimal overhead.
|
284
|
-
* It doesn't cause the groupingBlock or sortingBlock to be invoked,
|
285
|
-
* and it doesn't cause any writes to the database.
|
286
|
-
*
|
287
|
-
* You can touch
|
288
|
-
* - just the object
|
289
|
-
* - just the metadata
|
290
|
-
* - or both object and metadata (the row)
|
291
|
-
*
|
292
|
-
* If you mark just the object as changed,
|
293
|
-
* and neither the groupingBlock nor sortingBlock depend upon the object,
|
294
|
-
* then the view doesn't reflect any change.
|
295
|
-
*
|
296
|
-
* If you mark just the metadata as changed,
|
297
|
-
* and neither the groupingBlock nor sortingBlock depend upon the metadata,
|
298
|
-
* then the view doesn't relect any change.
|
299
|
-
*
|
300
|
-
* In all other cases, the view will properly reflect a corresponding change in the notification that's posted.
|
301
|
-
**/
|
302
|
-
|
303
|
-
- (void)touchRowForKey:(NSString *)key inCollection:(NSString *)collection;
|
304
|
-
- (void)touchObjectForKey:(NSString *)key inCollection:(NSString *)collection;
|
305
|
-
- (void)touchMetadataForKey:(NSString *)key inCollection:(NSString *)collection;
|
306
|
-
|
307
|
-
/**
|
308
|
-
* This method allows you to change the groupingBlock and/or sortingBlock on-the-fly.
|
309
|
-
*
|
310
|
-
* Note: You must pass a different versionTag, or this method does nothing.
|
311
|
-
**/
|
312
|
-
- (void)setGroupingBlock:(YapDatabaseViewGroupingBlock)groupingBlock
|
313
|
-
groupingBlockType:(YapDatabaseViewBlockType)groupingBlockType
|
314
|
-
sortingBlock:(YapDatabaseViewSortingBlock)sortingBlock
|
315
|
-
sortingBlockType:(YapDatabaseViewBlockType)sortingBlockType
|
316
|
-
versionTag:(NSString *)versionTag;
|
317
|
-
|
318
|
-
@end
|
319
|
-
|
320
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
321
|
-
#pragma mark -
|
322
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
323
|
-
|
324
|
-
/**
|
325
|
-
* YapDatabaseView deals with ordered arrays of collection/key tuples.
|
326
|
-
* So, strictly speaking, it only knows about collection/key tuples, groups, and indexes.
|
327
|
-
*
|
328
|
-
* But it's really convenient to have methods that put it all together to fetch an object in a single method.
|
329
|
-
**/
|
330
|
-
@interface YapDatabaseViewTransaction (Convenience)
|
331
|
-
|
332
|
-
/**
|
333
|
-
* Equivalent to invoking:
|
334
|
-
*
|
335
|
-
* NSString *collection, *key;
|
336
|
-
* if ([[transaction ext:@"myView"] getKey:&key collection:&collection atIndex:index inGroup:group]) {
|
337
|
-
* object = [transaction objectForKey:key inCollection:collection];
|
338
|
-
* }
|
339
|
-
**/
|
340
|
-
- (id)objectAtIndex:(NSUInteger)keyIndex inGroup:(NSString *)group;
|
341
|
-
|
342
|
-
/**
|
343
|
-
* Equivalent to invoking:
|
344
|
-
*
|
345
|
-
* NSString *collection, *key;
|
346
|
-
* if ([[transaction ext:@"myView"] getFirstKey:&key collection:&collection inGroup:group]) {
|
347
|
-
* object = [transaction objectForKey:key inCollection:collection];
|
348
|
-
* }
|
349
|
-
**/
|
350
|
-
- (id)firstObjectInGroup:(NSString *)group;
|
351
|
-
|
352
|
-
/**
|
353
|
-
* Equivalent to invoking:
|
354
|
-
*
|
355
|
-
* NSString *collection, *key;
|
356
|
-
* if ([[transaction ext:@"myView"] getLastKey:&key collection:&collection inGroup:group]) {
|
357
|
-
* object = [transaction objectForKey:key inCollection:collection];
|
358
|
-
* }
|
359
|
-
**/
|
360
|
-
- (id)lastObjectInGroup:(NSString *)group;
|
361
|
-
|
362
|
-
/**
|
363
|
-
* The following methods are equivalent to invoking the enumerateKeysInGroup:... methods,
|
364
|
-
* and then fetching the metadata within your own block.
|
365
|
-
**/
|
366
|
-
|
367
|
-
- (void)enumerateKeysAndMetadataInGroup:(NSString *)group
|
368
|
-
usingBlock:
|
369
|
-
(void (^)(NSString *collection, NSString *key, id metadata, NSUInteger index, BOOL *stop))block;
|
370
|
-
|
371
|
-
- (void)enumerateKeysAndMetadataInGroup:(NSString *)group
|
372
|
-
withOptions:(NSEnumerationOptions)options
|
373
|
-
usingBlock:
|
374
|
-
(void (^)(NSString *collection, NSString *key, id metadata, NSUInteger index, BOOL *stop))block;
|
375
|
-
|
376
|
-
- (void)enumerateKeysAndMetadataInGroup:(NSString *)group
|
377
|
-
withOptions:(NSEnumerationOptions)options
|
378
|
-
range:(NSRange)range
|
379
|
-
usingBlock:
|
380
|
-
(void (^)(NSString *collection, NSString *key, id metadata, NSUInteger index, BOOL *stop))block;
|
381
|
-
|
382
|
-
/**
|
383
|
-
* The following methods are equivalent to invoking the enumerateKeysInGroup:... methods,
|
384
|
-
* and then fetching the object within your own block.
|
385
|
-
**/
|
386
|
-
|
387
|
-
- (void)enumerateKeysAndObjectsInGroup:(NSString *)group
|
388
|
-
usingBlock:
|
389
|
-
(void (^)(NSString *collection, NSString *key, id object, NSUInteger index, BOOL *stop))block;
|
390
|
-
|
391
|
-
- (void)enumerateKeysAndObjectsInGroup:(NSString *)group
|
392
|
-
withOptions:(NSEnumerationOptions)options
|
393
|
-
usingBlock:
|
394
|
-
(void (^)(NSString *collection, NSString *key, id object, NSUInteger index, BOOL *stop))block;
|
395
|
-
|
396
|
-
- (void)enumerateKeysAndObjectsInGroup:(NSString *)group
|
397
|
-
withOptions:(NSEnumerationOptions)options
|
398
|
-
range:(NSRange)range
|
399
|
-
usingBlock:
|
400
|
-
(void (^)(NSString *collection, NSString *key, id object, NSUInteger index, BOOL *stop))block;
|
401
|
-
|
402
|
-
/**
|
403
|
-
* The following methods are equivalent to invoking the enumerateKeysInGroup:... methods,
|
404
|
-
* and then fetching the object and metadata within your own block.
|
405
|
-
**/
|
406
|
-
|
407
|
-
- (void)enumerateRowsInGroup:(NSString *)group
|
408
|
-
usingBlock:
|
409
|
-
(void (^)(NSString *collection, NSString *key, id object, id metadata, NSUInteger index, BOOL *stop))block;
|
410
|
-
|
411
|
-
- (void)enumerateRowsInGroup:(NSString *)group
|
412
|
-
withOptions:(NSEnumerationOptions)options
|
413
|
-
usingBlock:
|
414
|
-
(void (^)(NSString *collection, NSString *key, id object, id metadata, NSUInteger index, BOOL *stop))block;
|
415
|
-
|
416
|
-
- (void)enumerateRowsInGroup:(NSString *)group
|
417
|
-
withOptions:(NSEnumerationOptions)options
|
418
|
-
range:(NSRange)range
|
419
|
-
usingBlock:
|
420
|
-
(void (^)(NSString *collection, NSString *key, id object, id metadata, NSUInteger index, BOOL *stop))block;
|
421
|
-
|
422
|
-
@end
|
423
|
-
|
424
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
425
|
-
#pragma mark -
|
426
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
427
|
-
|
428
|
-
@interface YapDatabaseViewTransaction (Mappings)
|
429
|
-
|
430
|
-
/**
|
431
|
-
* Gets the key & collection at the given indexPath, assuming the given mappings are being used.
|
432
|
-
* Returns NO if the indexPath is invalid, or the mappings aren't initialized.
|
433
|
-
* Otherwise returns YES, and sets the key & collection ptr (both optional).
|
434
|
-
**/
|
435
|
-
- (BOOL)getKey:(NSString **)keyPtr
|
436
|
-
collection:(NSString **)collectionPtr
|
437
|
-
atIndexPath:(NSIndexPath *)indexPath
|
438
|
-
withMappings:(YapDatabaseViewMappings *)mappings;
|
439
|
-
|
440
|
-
/**
|
441
|
-
* Gets the key & collection at the given row & section, assuming the given mappings are being used.
|
442
|
-
* Returns NO if the row or section is invalid, or the mappings aren't initialized.
|
443
|
-
* Otherwise returns YES, and sets the key & collection ptr (both optional).
|
444
|
-
**/
|
445
|
-
- (BOOL)getKey:(NSString **)keyPtr
|
446
|
-
collection:(NSString **)collectionPtr
|
447
|
-
forRow:(NSUInteger)row
|
448
|
-
inSection:(NSUInteger)section
|
449
|
-
withMappings:(YapDatabaseViewMappings *)mappings;
|
450
|
-
|
451
|
-
/**
|
452
|
-
* Gets the object at the given indexPath, assuming the given mappings are being used.
|
453
|
-
*
|
454
|
-
* Equivalent to invoking:
|
455
|
-
*
|
456
|
-
* NSString *collection, *key;
|
457
|
-
* if ([[transaction ext:@"myView"] getKey:&key collection:&collection atIndexPath:indexPath withMappings:mappings]) {
|
458
|
-
* object = [transaction objectForKey:key inCollection:collection];
|
459
|
-
* }
|
460
|
-
**/
|
461
|
-
- (id)objectAtIndexPath:(NSIndexPath *)indexPath withMappings:(YapDatabaseViewMappings *)mappings;
|
462
|
-
|
463
|
-
/**
|
464
|
-
* Gets the object at the given indexPath, assuming the given mappings are being used.
|
465
|
-
*
|
466
|
-
* Equivalent to invoking:
|
467
|
-
*
|
468
|
-
* NSString *collection, *key;
|
469
|
-
* if ([[transaction ext:@"view"] getKey:&key
|
470
|
-
* collection:&collection
|
471
|
-
* forRow:row
|
472
|
-
* inSection:section
|
473
|
-
* withMappings:mappings]) {
|
474
|
-
* object = [transaction objectForKey:key inCollection:collection];
|
475
|
-
* }
|
476
|
-
**/
|
477
|
-
- (id)objectAtRow:(NSUInteger)row inSection:(NSUInteger)section withMappings:(YapDatabaseViewMappings *)mappings;
|
478
|
-
|
479
|
-
/**
|
480
|
-
* Fetches the indexPath for the given {collection, key} tuple, assuming the given mappings are being used.
|
481
|
-
* Returns nil if the {collection, key} tuple isn't included in the view + mappings.
|
482
|
-
**/
|
483
|
-
- (NSIndexPath *)indexPathForKey:(NSString *)key
|
484
|
-
inCollection:(NSString *)collection
|
485
|
-
withMappings:(YapDatabaseViewMappings *)mappings;
|
486
|
-
|
487
|
-
/**
|
488
|
-
* Fetches the row & section for the given {collection, key} tuple, assuming the given mappings are being used.
|
489
|
-
* Returns NO if the {collection, key} tuple isn't included in the view + mappings.
|
490
|
-
* Otherwise returns YES, and sets the row & section (both optional).
|
491
|
-
**/
|
492
|
-
- (BOOL)getRow:(NSUInteger *)rowPtr
|
493
|
-
section:(NSUInteger *)sectionPtr
|
494
|
-
forKey:(NSString *)key
|
495
|
-
inCollection:(NSString *)collection
|
496
|
-
withMappings:(YapDatabaseViewMappings *)mappings;
|
497
|
-
|
498
|
-
@end
|