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
data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewChangePrivate.h
DELETED
@@ -1,94 +0,0 @@
|
|
1
|
-
#import "YapDatabaseViewChange.h"
|
2
|
-
#import "YapDatabaseViewMappings.h"
|
3
|
-
|
4
|
-
/**
|
5
|
-
* This header file is PRIVATE, and is only to be used by the YapDatabaseView classes.
|
6
|
-
**/
|
7
|
-
|
8
|
-
@interface YapDatabaseViewSectionChange () {
|
9
|
-
@public
|
10
|
-
|
11
|
-
// This header file is PRIVATE, and is only to be used by YapDatabaseView classes
|
12
|
-
|
13
|
-
NSString *group; // immutable
|
14
|
-
BOOL isReset; // immutable
|
15
|
-
|
16
|
-
YapDatabaseViewChangeType type; // mutable during consolidation
|
17
|
-
|
18
|
-
NSUInteger originalSection; // mutable during pre-processing
|
19
|
-
NSUInteger finalSection; // mutable during pre-processing
|
20
|
-
}
|
21
|
-
|
22
|
-
+ (YapDatabaseViewSectionChange *)insertGroup:(NSString *)group;
|
23
|
-
+ (YapDatabaseViewSectionChange *)deleteGroup:(NSString *)group;
|
24
|
-
|
25
|
-
+ (YapDatabaseViewSectionChange *)resetGroup:(NSString *)group;
|
26
|
-
|
27
|
-
@end
|
28
|
-
|
29
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
30
|
-
#pragma mark -
|
31
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
32
|
-
|
33
|
-
@interface YapDatabaseViewRowChange () {
|
34
|
-
@public
|
35
|
-
|
36
|
-
// This header file is PRIVATE, and is only to be used by YapDatabaseView classes
|
37
|
-
|
38
|
-
id key; // immutable
|
39
|
-
|
40
|
-
NSString *originalGroup; // immutable
|
41
|
-
NSString *finalGroup; // mutable during consolidation
|
42
|
-
|
43
|
-
YapDatabaseViewChangeType type; // mutable during consolidation
|
44
|
-
int changes; // mutable during consolidation
|
45
|
-
|
46
|
-
NSUInteger opOriginalIndex; // immutable
|
47
|
-
NSUInteger opFinalIndex; // immutable
|
48
|
-
|
49
|
-
NSUInteger originalIndex; // mutable during processing
|
50
|
-
NSUInteger finalIndex; // mutable during processing
|
51
|
-
|
52
|
-
NSUInteger originalSection; // mutable during pre-processing
|
53
|
-
NSUInteger finalSection; // mutable during pre-processing
|
54
|
-
}
|
55
|
-
|
56
|
-
/**
|
57
|
-
* During a transaction, there are only 3 row change types that may be recorded.
|
58
|
-
*
|
59
|
-
* Post-processing figures out everything else, such as if an item was moved,
|
60
|
-
* or if multiple operations can be consolidated into one.
|
61
|
-
**/
|
62
|
-
|
63
|
-
+ (YapDatabaseViewRowChange *)insertKey:(id)key inGroup:(NSString *)group atIndex:(NSUInteger)index;
|
64
|
-
+ (YapDatabaseViewRowChange *)deleteKey:(id)key inGroup:(NSString *)group atIndex:(NSUInteger)index;
|
65
|
-
|
66
|
-
+ (YapDatabaseViewRowChange *)updateKey:(id)key changes:(int)flags inGroup:(NSString *)group atIndex:(NSUInteger)index;
|
67
|
-
|
68
|
-
@end
|
69
|
-
|
70
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
71
|
-
#pragma mark -
|
72
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
73
|
-
|
74
|
-
@interface YapDatabaseViewChange : NSObject
|
75
|
-
|
76
|
-
/**
|
77
|
-
* The brains behind the post-processing logic.
|
78
|
-
* Exposed privately to be used by the unit tests.
|
79
|
-
**/
|
80
|
-
+ (void)processRowChanges:(NSMutableArray *)changes;
|
81
|
-
+ (void)consolidateRowChanges:(NSMutableArray *)changes;
|
82
|
-
|
83
|
-
/**
|
84
|
-
* This method applies the given mappings, and then invokes the post-processing method.
|
85
|
-
*
|
86
|
-
* This method is ONLY to be used by YapDatabaseViewConnection.
|
87
|
-
**/
|
88
|
-
+ (void)getSectionChanges:(NSArray **)sectionChangesPtr
|
89
|
-
rowChanges:(NSArray **)rowChangesPtr
|
90
|
-
withOriginalMappings:(YapDatabaseViewMappings *)originalMappings
|
91
|
-
finalMappings:(YapDatabaseViewMappings *)finalMappings
|
92
|
-
fromChanges:(NSArray *)changes;
|
93
|
-
|
94
|
-
@end
|
data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewMappingsPrivate.h
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
#import "YapDatabaseViewMappings.h"
|
2
|
-
|
3
|
-
/**
|
4
|
-
* This header file is PRIVATE, and is only to be used by the YapDatabaseView classes.
|
5
|
-
**/
|
6
|
-
|
7
|
-
@interface YapDatabaseViewMappings ()
|
8
|
-
|
9
|
-
/**
|
10
|
-
* For UNIT TESTING only.
|
11
|
-
**/
|
12
|
-
- (void)updateWithCounts:(NSDictionary *)counts;
|
13
|
-
|
14
|
-
/**
|
15
|
-
* Returns a mutable copy of the count dictionary, where:
|
16
|
-
* key = group
|
17
|
-
* value = NSNumber of count of items
|
18
|
-
**/
|
19
|
-
- (NSMutableDictionary *)counts;
|
20
|
-
|
21
|
-
/**
|
22
|
-
* fullCountForGroup => Count from view.group (excluding rangeOptions)
|
23
|
-
* visibleCountForGroup => Subset count (including rangeOptions)
|
24
|
-
**/
|
25
|
-
- (NSUInteger)fullCountForGroup:(NSString *)group;
|
26
|
-
- (NSUInteger)visibleCountForGroup:(NSString *)group;
|
27
|
-
|
28
|
-
/**
|
29
|
-
* Returns a copy of the rangeOptions dictionary, where:
|
30
|
-
* key = group
|
31
|
-
* value = YapDatabaseViewMappingsRangeOptions
|
32
|
-
**/
|
33
|
-
- (NSDictionary *)rangeOptions;
|
34
|
-
|
35
|
-
/**
|
36
|
-
* This method is used by YapDatabaseViewChange.
|
37
|
-
*
|
38
|
-
* After processing changeset(s), the length and/or offset may change.
|
39
|
-
* The new length and/or offsets are properly calculated,
|
40
|
-
* and then this method is used to avoid duplicating the calculations.
|
41
|
-
*
|
42
|
-
* Note: After invoking this method, be sure to invoke updateVisibility (after all groups have been updated).
|
43
|
-
**/
|
44
|
-
- (void)updateRangeOptionsForGroup:(NSString *)group
|
45
|
-
withNewLength:(NSUInteger)newLength
|
46
|
-
newOffset:(NSUInteger)newOffset;
|
47
|
-
|
48
|
-
/**
|
49
|
-
* Normally this method is called automatically.
|
50
|
-
* But needs to be called manually if you use updateRangeOptionsForGroup:withNewLength:newOffset:
|
51
|
-
**/
|
52
|
-
- (void)updateVisibility;
|
53
|
-
|
54
|
-
/**
|
55
|
-
* Returns a copy of the dependencies dictionary, where:
|
56
|
-
* key = group
|
57
|
-
* value = NSSet of cellDrawingDependency offsets
|
58
|
-
**/
|
59
|
-
- (NSDictionary *)dependencies;
|
60
|
-
|
61
|
-
/**
|
62
|
-
* Returns a copy of the reverse set, which contains groups that are to be reversed.
|
63
|
-
**/
|
64
|
-
- (NSSet *)reverse;
|
65
|
-
|
66
|
-
/**
|
67
|
-
* During processing we need to disable the the isUsingConsolidatedGroup flag
|
68
|
-
* in order to access the raw mappings.
|
69
|
-
**/
|
70
|
-
- (void)setAutoConsolidatingDisabled:(BOOL)disabled;
|
71
|
-
|
72
|
-
@end
|
@@ -1,36 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
@interface YapDatabaseViewPage : NSObject <NSCopying>
|
4
|
-
|
5
|
-
- (id)init;
|
6
|
-
- (id)initWithCapacity:(NSUInteger)capacity;
|
7
|
-
|
8
|
-
- (NSData *)serialize;
|
9
|
-
- (void)deserialize:(NSData *)data;
|
10
|
-
|
11
|
-
- (NSUInteger)count;
|
12
|
-
|
13
|
-
- (int64_t)rowidAtIndex:(NSUInteger)index;
|
14
|
-
|
15
|
-
- (void)addRowid:(int64_t)rowid;
|
16
|
-
- (void)insertRowid:(int64_t)rowid atIndex:(NSUInteger)index;
|
17
|
-
|
18
|
-
- (void)removeRowidAtIndex:(NSUInteger)index;
|
19
|
-
|
20
|
-
- (void)removeRange:(NSRange)range;
|
21
|
-
|
22
|
-
- (void)appendRange:(NSRange)range ofPage:(YapDatabaseViewPage *)page;
|
23
|
-
- (void)prependRange:(NSRange)range ofPage:(YapDatabaseViewPage *)page;
|
24
|
-
|
25
|
-
- (BOOL)getIndex:(NSUInteger *)indexPtr ofRowid:(int64_t)rowid;
|
26
|
-
|
27
|
-
- (void)enumerateRowidsUsingBlock:(void (^)(int64_t rowid, NSUInteger idx, BOOL *stop))block;
|
28
|
-
|
29
|
-
- (void)enumerateRowidsWithOptions:(NSEnumerationOptions)options
|
30
|
-
usingBlock:(void (^)(int64_t rowid, NSUInteger index, BOOL *stop))block;
|
31
|
-
|
32
|
-
- (void)enumerateRowidsWithOptions:(NSEnumerationOptions)options
|
33
|
-
range:(NSRange)range
|
34
|
-
usingBlock:(void (^)(int64_t rowid, NSUInteger index, BOOL *stop))block;
|
35
|
-
|
36
|
-
@end
|
@@ -1,296 +0,0 @@
|
|
1
|
-
#import "YapDatabaseViewPage.h"
|
2
|
-
#include <vector>
|
3
|
-
|
4
|
-
|
5
|
-
@implementation YapDatabaseViewPage
|
6
|
-
{
|
7
|
-
std::vector<int64_t> *vector;
|
8
|
-
}
|
9
|
-
|
10
|
-
- (id)init
|
11
|
-
{
|
12
|
-
return [self initWithCapacity:0];
|
13
|
-
}
|
14
|
-
|
15
|
-
- (id)initWithCapacity:(NSUInteger)capacity
|
16
|
-
{
|
17
|
-
if ((self = [super init]))
|
18
|
-
{
|
19
|
-
vector = new std::vector<int64_t>();
|
20
|
-
|
21
|
-
if (capacity > 0)
|
22
|
-
vector->reserve(capacity);
|
23
|
-
}
|
24
|
-
return self;
|
25
|
-
}
|
26
|
-
|
27
|
-
- (id)copyWithZone:(NSZone *)zone
|
28
|
-
{
|
29
|
-
YapDatabaseViewPage *copy = [[YapDatabaseViewPage alloc] initWithCapacity:[self count]];
|
30
|
-
|
31
|
-
copy->vector->insert(copy->vector->begin(), vector->begin(), vector->end());
|
32
|
-
|
33
|
-
return copy;
|
34
|
-
}
|
35
|
-
|
36
|
-
- (void)dealloc
|
37
|
-
{
|
38
|
-
if (vector)
|
39
|
-
delete vector;
|
40
|
-
}
|
41
|
-
|
42
|
-
- (NSData *)serialize
|
43
|
-
{
|
44
|
-
NSUInteger count = vector->size();
|
45
|
-
NSUInteger numBytes = count * sizeof(int64_t);
|
46
|
-
|
47
|
-
int64_t *buffer = (int64_t *)malloc(numBytes);
|
48
|
-
memcpy(buffer, vector->data(), numBytes);
|
49
|
-
|
50
|
-
if (CFByteOrderGetCurrent() == CFByteOrderBigEndian)
|
51
|
-
{
|
52
|
-
for (NSUInteger i = 0; i < count; i++)
|
53
|
-
{
|
54
|
-
buffer[i] = CFSwapInt64HostToLittle(buffer[i]);
|
55
|
-
}
|
56
|
-
}
|
57
|
-
|
58
|
-
return [NSData dataWithBytesNoCopy:buffer length:numBytes freeWhenDone:YES];
|
59
|
-
}
|
60
|
-
|
61
|
-
- (void)deserialize:(NSData *)data
|
62
|
-
{
|
63
|
-
vector->clear();
|
64
|
-
|
65
|
-
NSUInteger count = [data length] / sizeof(int64_t);
|
66
|
-
int64_t *bytes = (int64_t *)[data bytes];
|
67
|
-
|
68
|
-
if (vector->capacity() < count)
|
69
|
-
vector->reserve(count);
|
70
|
-
|
71
|
-
for (NSUInteger i = 0; i < count; i++)
|
72
|
-
{
|
73
|
-
int64_t rowid = bytes[i];
|
74
|
-
|
75
|
-
if (CFByteOrderGetCurrent() == CFByteOrderBigEndian)
|
76
|
-
vector->push_back(CFSwapInt64LittleToHost(rowid));
|
77
|
-
else
|
78
|
-
vector->push_back(rowid);
|
79
|
-
}
|
80
|
-
}
|
81
|
-
|
82
|
-
- (NSUInteger)count
|
83
|
-
{
|
84
|
-
return (NSUInteger)(vector->size());
|
85
|
-
}
|
86
|
-
|
87
|
-
- (int64_t)rowidAtIndex:(NSUInteger)index
|
88
|
-
{
|
89
|
-
return vector->at(index);
|
90
|
-
}
|
91
|
-
|
92
|
-
- (void)addRowid:(int64_t)rowid
|
93
|
-
{
|
94
|
-
vector->push_back(rowid);
|
95
|
-
}
|
96
|
-
|
97
|
-
- (void)insertRowid:(int64_t)rowid atIndex:(NSUInteger)index
|
98
|
-
{
|
99
|
-
vector->insert(vector->begin() + index, rowid);
|
100
|
-
}
|
101
|
-
|
102
|
-
- (void)removeRowidAtIndex:(NSUInteger)index
|
103
|
-
{
|
104
|
-
vector->erase(vector->begin() + index);
|
105
|
-
}
|
106
|
-
|
107
|
-
- (void)removeRange:(NSRange)range
|
108
|
-
{
|
109
|
-
std::vector<int64_t>::iterator it = vector->begin();
|
110
|
-
|
111
|
-
vector->erase(it+range.location, it+range.location+range.length);
|
112
|
-
}
|
113
|
-
|
114
|
-
- (void)appendRange:(NSRange)range ofPage:(YapDatabaseViewPage *)page
|
115
|
-
{
|
116
|
-
std::vector<int64_t>::iterator rangeBegin = page->vector->begin();
|
117
|
-
std::vector<int64_t>::iterator rangeEnd;
|
118
|
-
|
119
|
-
rangeBegin += range.location;
|
120
|
-
rangeEnd = rangeBegin + range.length;
|
121
|
-
|
122
|
-
vector->insert(vector->end(), rangeBegin, rangeEnd);
|
123
|
-
}
|
124
|
-
|
125
|
-
- (void)prependRange:(NSRange)range ofPage:(YapDatabaseViewPage *)page
|
126
|
-
{
|
127
|
-
std::vector<int64_t>::iterator rangeBegin = page->vector->begin();
|
128
|
-
std::vector<int64_t>::iterator rangeEnd;
|
129
|
-
|
130
|
-
rangeBegin += range.location;
|
131
|
-
rangeEnd = rangeBegin + range.length;
|
132
|
-
|
133
|
-
vector->insert(vector->begin(), rangeBegin, rangeEnd);
|
134
|
-
}
|
135
|
-
|
136
|
-
- (BOOL)getIndex:(NSUInteger *)indexPtr ofRowid:(int64_t)rowid
|
137
|
-
{
|
138
|
-
std::vector<int64_t>::iterator iterator = vector->begin();
|
139
|
-
std::vector<int64_t>::iterator end = vector->end();
|
140
|
-
|
141
|
-
NSUInteger index = 0;
|
142
|
-
|
143
|
-
while (iterator != end)
|
144
|
-
{
|
145
|
-
if (*iterator == rowid)
|
146
|
-
{
|
147
|
-
if (indexPtr) *indexPtr = index;
|
148
|
-
return YES;
|
149
|
-
}
|
150
|
-
|
151
|
-
iterator++;
|
152
|
-
index++;
|
153
|
-
}
|
154
|
-
|
155
|
-
if (indexPtr) *indexPtr = 0;
|
156
|
-
return NO;
|
157
|
-
}
|
158
|
-
|
159
|
-
- (void)enumerateRowidsUsingBlock:(void (^)(int64_t rowid, NSUInteger idx, BOOL *stop))block
|
160
|
-
{
|
161
|
-
[self enumerateRowidsWithOptions:0 usingBlock:block];
|
162
|
-
}
|
163
|
-
|
164
|
-
- (void)enumerateRowidsWithOptions:(NSEnumerationOptions)options
|
165
|
-
usingBlock:(void (^)(int64_t rowid, NSUInteger index, BOOL *stop))block
|
166
|
-
{
|
167
|
-
if (block == NULL) return;
|
168
|
-
|
169
|
-
if ((options & NSEnumerationReverse) == 0)
|
170
|
-
{
|
171
|
-
// Forward enumeration
|
172
|
-
|
173
|
-
std::vector<int64_t>::iterator iterator = vector->begin();
|
174
|
-
std::vector<int64_t>::iterator end = vector->end();
|
175
|
-
|
176
|
-
NSUInteger index = 0;
|
177
|
-
BOOL stop = NO;
|
178
|
-
|
179
|
-
while (iterator != end)
|
180
|
-
{
|
181
|
-
int64_t rowid = *iterator;
|
182
|
-
|
183
|
-
block(rowid, index, &stop);
|
184
|
-
|
185
|
-
if (stop) break;
|
186
|
-
|
187
|
-
iterator++;
|
188
|
-
index++;
|
189
|
-
}
|
190
|
-
}
|
191
|
-
else
|
192
|
-
{
|
193
|
-
// Reverse enumeration
|
194
|
-
|
195
|
-
std::vector<int64_t>::reverse_iterator iterator = vector->rbegin();
|
196
|
-
std::vector<int64_t>::reverse_iterator end = vector->rend();
|
197
|
-
|
198
|
-
NSUInteger index = vector->size() - 1;
|
199
|
-
BOOL stop = NO;
|
200
|
-
|
201
|
-
while (iterator != end)
|
202
|
-
{
|
203
|
-
int64_t rowid = *iterator;
|
204
|
-
|
205
|
-
block(rowid, index, &stop);
|
206
|
-
|
207
|
-
if (stop) break;
|
208
|
-
|
209
|
-
iterator++;
|
210
|
-
index--;
|
211
|
-
}
|
212
|
-
}
|
213
|
-
}
|
214
|
-
|
215
|
-
- (void)enumerateRowidsWithOptions:(NSEnumerationOptions)options
|
216
|
-
range:(NSRange)range
|
217
|
-
usingBlock:(void (^)(int64_t rowid, NSUInteger index, BOOL *stop))block
|
218
|
-
{
|
219
|
-
if (block == NULL) return;
|
220
|
-
|
221
|
-
if ((options & NSEnumerationReverse) == 0)
|
222
|
-
{
|
223
|
-
// Forward enumeration
|
224
|
-
|
225
|
-
std::vector<int64_t>::iterator iterator = vector->begin();
|
226
|
-
std::vector<int64_t>::iterator end;
|
227
|
-
|
228
|
-
iterator += range.location;
|
229
|
-
end = iterator + range.length;
|
230
|
-
|
231
|
-
NSUInteger index = range.location;
|
232
|
-
BOOL stop = NO;
|
233
|
-
|
234
|
-
while (iterator != end)
|
235
|
-
{
|
236
|
-
int64_t rowid = *iterator;
|
237
|
-
|
238
|
-
block(rowid, index, &stop);
|
239
|
-
|
240
|
-
if (stop) break;
|
241
|
-
|
242
|
-
iterator++;
|
243
|
-
index++;
|
244
|
-
}
|
245
|
-
}
|
246
|
-
else
|
247
|
-
{
|
248
|
-
// Reverse enumeration
|
249
|
-
|
250
|
-
std::vector<int64_t>::reverse_iterator iterator = vector->rbegin();
|
251
|
-
std::vector<int64_t>::reverse_iterator end;
|
252
|
-
|
253
|
-
iterator += (vector->size() - (range.location + range.length));
|
254
|
-
end = iterator + range.length;
|
255
|
-
|
256
|
-
NSUInteger index = range.location + range.length - 1;
|
257
|
-
BOOL stop = NO;
|
258
|
-
|
259
|
-
while (iterator != end)
|
260
|
-
{
|
261
|
-
int64_t rowid = *iterator;
|
262
|
-
|
263
|
-
block(rowid, index, &stop);
|
264
|
-
|
265
|
-
if (stop) break;
|
266
|
-
|
267
|
-
iterator++;
|
268
|
-
index--;
|
269
|
-
}
|
270
|
-
}
|
271
|
-
}
|
272
|
-
|
273
|
-
- (NSString *)debugDescription
|
274
|
-
{
|
275
|
-
NSMutableString *string = [NSMutableString stringWithCapacity:100];
|
276
|
-
[string appendFormat:@"<YapDatabaseViewPage[%p] count=%lu {\n", self, (unsigned long)[self count]];
|
277
|
-
|
278
|
-
std::vector<int64_t>::iterator iterator = vector->begin();
|
279
|
-
std::vector<int64_t>::iterator end = vector->end();
|
280
|
-
|
281
|
-
NSUInteger index = 0;
|
282
|
-
|
283
|
-
while (iterator != end)
|
284
|
-
{
|
285
|
-
[string appendFormat:@" %lu: %lld\n", (unsigned long)index, *iterator];
|
286
|
-
|
287
|
-
iterator++;
|
288
|
-
index++;
|
289
|
-
}
|
290
|
-
|
291
|
-
[string appendFormat:@"}>"];
|
292
|
-
|
293
|
-
return string;
|
294
|
-
}
|
295
|
-
|
296
|
-
@end
|