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,449 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
@class YapDatabase;
|
4
|
-
@class YapDatabaseReadTransaction;
|
5
|
-
@class YapDatabaseReadWriteTransaction;
|
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 visit the wiki.
|
14
|
-
* https://github.com/yaptv/YapDatabase/wiki
|
15
|
-
*
|
16
|
-
* From a single YapDatabase instance you can create multiple connections.
|
17
|
-
* Each connection is thread-safe and may be used concurrently with other connections.
|
18
|
-
*
|
19
|
-
* Multiple connections can simultaneously read from the database.
|
20
|
-
* Multiple connections can simultaneously read from the database while another connection is modifying the database.
|
21
|
-
* For example, the main thread could be reading from the database via connection A,
|
22
|
-
* while a background thread is writing to the database via connection B.
|
23
|
-
*
|
24
|
-
* However, only a single connection may be writing to the database at any one time.
|
25
|
-
* This is an inherent limitation of the underlying sqlite database.
|
26
|
-
*
|
27
|
-
* A connection instance is thread-safe, and operates by serializing access to itself.
|
28
|
-
* Thus you can share a single connection between multiple threads.
|
29
|
-
* But for conncurrent access between multiple threads you must use multiple connections.
|
30
|
-
**/
|
31
|
-
|
32
|
-
enum {
|
33
|
-
YapDatabaseConnectionFlushMemoryFlags_None = 0,
|
34
|
-
YapDatabaseConnectionFlushMemoryFlags_Caches = 1 << 0,
|
35
|
-
YapDatabaseConnectionFlushMemoryFlags_Statements = 1 << 1,
|
36
|
-
YapDatabaseConnectionFlushMemoryFlags_All = (YapDatabaseConnectionFlushMemoryFlags_Caches |
|
37
|
-
YapDatabaseConnectionFlushMemoryFlags_Statements),
|
38
|
-
};
|
39
|
-
typedef int YapDatabaseConnectionFlushMemoryFlags;
|
40
|
-
|
41
|
-
typedef enum {
|
42
|
-
YapDatabasePolicyContainment = 0,
|
43
|
-
YapDatabasePolicyShare = 1,
|
44
|
-
YapDatabasePolicyCopy = 2,
|
45
|
-
} YapDatabasePolicy;
|
46
|
-
|
47
|
-
|
48
|
-
@interface YapDatabaseConnection : NSObject
|
49
|
-
|
50
|
-
/**
|
51
|
-
* A database connection maintains a strong reference to its parent.
|
52
|
-
*
|
53
|
-
* This is to enforce the following core architecture rule:
|
54
|
-
* A database instance cannot be deallocated if a corresponding connection is stil alive.
|
55
|
-
**/
|
56
|
-
@property (nonatomic, strong, readonly) YapDatabase *database;
|
57
|
-
|
58
|
-
/**
|
59
|
-
* The optional name property assists in debugging.
|
60
|
-
* It is only used internally for log statements.
|
61
|
-
**/
|
62
|
-
@property (atomic, copy, readwrite) NSString *name;
|
63
|
-
|
64
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
65
|
-
#pragma mark Cache
|
66
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
67
|
-
|
68
|
-
/**
|
69
|
-
* Each database connection maintains an independent cache of deserialized objects.
|
70
|
-
* This reduces disk IO and the overhead of the deserialization process.
|
71
|
-
* You can optionally configure the cache size, or disable it completely.
|
72
|
-
*
|
73
|
-
* The cache is properly kept in sync with the atomic snapshot architecture of the database system.
|
74
|
-
*
|
75
|
-
* You can configure the objectCache at any time, including within readBlocks or readWriteBlocks.
|
76
|
-
* To disable the object cache entirely, set objectCacheEnabled to NO.
|
77
|
-
* To use an inifinite cache size, set the objectCacheLimit to zero.
|
78
|
-
*
|
79
|
-
* By default the objectCache is enabled and has a limit of 250.
|
80
|
-
*
|
81
|
-
* New connections will inherit the default values set by the parent database object.
|
82
|
-
* Thus the default values for new connection instances are configurable.
|
83
|
-
*
|
84
|
-
* @see YapDatabase defaultObjectCacheEnabled
|
85
|
-
* @see YapDatabase defaultObjectCacheLimit
|
86
|
-
*
|
87
|
-
* Also see the wiki for a bit more info:
|
88
|
-
* https://github.com/yaptv/YapDatabase/wiki/Cache
|
89
|
-
**/
|
90
|
-
@property (atomic, assign, readwrite) BOOL objectCacheEnabled;
|
91
|
-
@property (atomic, assign, readwrite) NSUInteger objectCacheLimit;
|
92
|
-
|
93
|
-
/**
|
94
|
-
* Each database connection maintains an independent cache of deserialized metadata.
|
95
|
-
* This reduces disk IO and the overhead of the deserialization process.
|
96
|
-
* You can optionally configure the cache size, or disable it completely.
|
97
|
-
*
|
98
|
-
* The cache is properly kept in sync with the atomic snapshot architecture of the database system.
|
99
|
-
*
|
100
|
-
* You can configure the metadataCache at any time, including within readBlocks or readWriteBlocks.
|
101
|
-
* To disable the metadata cache entirely, set metadataCacheEnabled to NO.
|
102
|
-
* To use an inifinite cache size, set the metadataCacheLimit to zero.
|
103
|
-
*
|
104
|
-
* By default the metadataCache is enabled and has a limit of 500.
|
105
|
-
*
|
106
|
-
* New connections will inherit the default values set by the parent database object.
|
107
|
-
* Thus the default values for new connection instances are configurable.
|
108
|
-
*
|
109
|
-
* @see YapDatabase defaultMetadataCacheEnabled
|
110
|
-
* @see YapDatabase defaultMetadataCacheLimit
|
111
|
-
*
|
112
|
-
* Also see the wiki for a bit more info:
|
113
|
-
* https://github.com/yaptv/YapDatabase/wiki/Cache
|
114
|
-
**/
|
115
|
-
@property (atomic, assign, readwrite) BOOL metadataCacheEnabled;
|
116
|
-
@property (atomic, assign, readwrite) NSUInteger metadataCacheLimit;
|
117
|
-
|
118
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
119
|
-
#pragma mark Policy
|
120
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
121
|
-
|
122
|
-
/**
|
123
|
-
* YapDatabase can use various optimizations to reduce overhead and memory footprint.
|
124
|
-
* The policy properties allow you to opt in to these optimizations when ready.
|
125
|
-
*
|
126
|
-
* The default value is YapDatabasePolicyContainment.
|
127
|
-
*
|
128
|
-
* It is the slowest, but also the safest policy.
|
129
|
-
* The other policies require a little more work, and little deeper understanding.
|
130
|
-
*
|
131
|
-
* These optimizations are discussed extensively in the wiki article "Performance Pro":
|
132
|
-
* https://github.com/yaptv/YapDatabase/wiki/Performance-Pro
|
133
|
-
**/
|
134
|
-
@property (atomic, assign, readwrite) YapDatabasePolicy objectPolicy;
|
135
|
-
@property (atomic, assign, readwrite) YapDatabasePolicy metadataPolicy;
|
136
|
-
|
137
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
138
|
-
#pragma mark State
|
139
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
140
|
-
|
141
|
-
/**
|
142
|
-
* The snapshot number is the internal synchronization state primitive for the connection.
|
143
|
-
* It's generally only useful for database internals,
|
144
|
-
* but it can sometimes come in handy for general debugging of your app.
|
145
|
-
*
|
146
|
-
* The snapshot is a simple 64-bit number that gets incremented upon every readwrite transaction
|
147
|
-
* that makes modifications to the database. Due to the concurrent architecture of YapDatabase,
|
148
|
-
* there may be multiple concurrent connections that are inspecting the database at similar times,
|
149
|
-
* yet they are looking at slightly different "snapshots" of the database.
|
150
|
-
*
|
151
|
-
* The snapshot number may thus be inspected to determine (in a general fashion) what state the connection
|
152
|
-
* is in compared with other connections.
|
153
|
-
*
|
154
|
-
* You may also query YapDatabase.snapshot to determine the most up-to-date snapshot among all connections.
|
155
|
-
*
|
156
|
-
* Example:
|
157
|
-
*
|
158
|
-
* YapDatabase *database = [[YapDatabase alloc] init...];
|
159
|
-
* database.snapshot; // returns zero
|
160
|
-
*
|
161
|
-
* YapDatabaseConnection *connection1 = [database newConnection];
|
162
|
-
* YapDatabaseConnection *connection2 = [database newConnection];
|
163
|
-
*
|
164
|
-
* connection1.snapshot; // returns zero
|
165
|
-
* connection2.snapshot; // returns zero
|
166
|
-
*
|
167
|
-
* [connection1 readWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction){
|
168
|
-
* [transaction setObject:objectA forKey:keyA];
|
169
|
-
* }];
|
170
|
-
*
|
171
|
-
* database.snapshot; // returns 1
|
172
|
-
* connection1.snapshot; // returns 1
|
173
|
-
* connection2.snapshot; // returns 1
|
174
|
-
*
|
175
|
-
* [connection1 asyncReadWriteWithBlock:^(YapDatabaseReadWriteTransaction *transaction){
|
176
|
-
* [transaction setObject:objectB forKey:keyB];
|
177
|
-
* [NSThread sleepForTimeInterval:1.0]; // sleep for 1 second
|
178
|
-
*
|
179
|
-
* connection1.snapshot; // returns 1 (we know it will turn into 2 once the transaction completes)
|
180
|
-
* } completion:^{
|
181
|
-
*
|
182
|
-
* connection1.snapshot; // returns 2
|
183
|
-
* }];
|
184
|
-
*
|
185
|
-
* [connection2 asyncReadWithBlock:^(YapDatabaseReadTransaction *transaction){
|
186
|
-
* [NSThread sleepForTimeInterval:5.0]; // sleep for 5 seconds
|
187
|
-
*
|
188
|
-
* connection2.snapshot; // returns 1. See why?
|
189
|
-
* }];
|
190
|
-
*
|
191
|
-
* It's because connection2 started its transaction when the database was in snapshot 1.
|
192
|
-
* Thus, for the duration of its transaction, the database remains in that state.
|
193
|
-
*
|
194
|
-
* However, once connection2 completes its transaction, it will automatically update itself to snapshot 2.
|
195
|
-
*
|
196
|
-
* In general, the snapshot is primarily for internal use.
|
197
|
-
* However, it may come in handy for some tricky edge-case bugs (why doesn't my connection see that other commit?)
|
198
|
-
**/
|
199
|
-
@property (atomic, assign, readonly) uint64_t snapshot;
|
200
|
-
|
201
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
202
|
-
#pragma mark Transactions
|
203
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
204
|
-
|
205
|
-
/**
|
206
|
-
* Read-only access to the database.
|
207
|
-
*
|
208
|
-
* The given block can run concurrently with sibling connections,
|
209
|
-
* regardless of whether the sibling connections are executing read-only or read-write transactions.
|
210
|
-
*
|
211
|
-
* The only time this method ever blocks is if another thread is currently using this connection instance
|
212
|
-
* to execute a readBlock or readWriteBlock. Recall that you may create multiple connections for concurrent access.
|
213
|
-
*
|
214
|
-
* This method is synchronous.
|
215
|
-
**/
|
216
|
-
- (void)readWithBlock:(void (^)(YapDatabaseReadTransaction *transaction))block;
|
217
|
-
|
218
|
-
/**
|
219
|
-
* Read-write access to the database.
|
220
|
-
*
|
221
|
-
* Only a single read-write block can execute among all sibling connections.
|
222
|
-
* Thus this method may block if another sibling connection is currently executing a read-write block.
|
223
|
-
**/
|
224
|
-
- (void)readWriteWithBlock:(void (^)(YapDatabaseReadWriteTransaction *transaction))block;
|
225
|
-
|
226
|
-
/**
|
227
|
-
* Read-only access to the database.
|
228
|
-
*
|
229
|
-
* The given block can run concurrently with sibling connections,
|
230
|
-
* regardless of whether the sibling connections are executing read-only or read-write transactions.
|
231
|
-
*
|
232
|
-
* This method is asynchronous.
|
233
|
-
**/
|
234
|
-
- (void)asyncReadWithBlock:(void (^)(YapDatabaseReadTransaction *transaction))block;
|
235
|
-
|
236
|
-
/**
|
237
|
-
* Read-only access to the database.
|
238
|
-
*
|
239
|
-
* The given block can run concurrently with sibling connections,
|
240
|
-
* regardless of whether the sibling connections are executing read-only or read-write transactions.
|
241
|
-
*
|
242
|
-
* This method is asynchronous.
|
243
|
-
*
|
244
|
-
* An optional completion block may be used.
|
245
|
-
* The completionBlock will be invoked on the main thread (dispatch_get_main_queue()).
|
246
|
-
**/
|
247
|
-
- (void)asyncReadWithBlock:(void (^)(YapDatabaseReadTransaction *transaction))block
|
248
|
-
completionBlock:(dispatch_block_t)completionBlock;
|
249
|
-
|
250
|
-
/**
|
251
|
-
* Read-only access to the database.
|
252
|
-
*
|
253
|
-
* The given block can run concurrently with sibling connections,
|
254
|
-
* regardless of whether the sibling connections are executing read-only or read-write transactions.
|
255
|
-
*
|
256
|
-
* This method is asynchronous.
|
257
|
-
*
|
258
|
-
* An optional completion block may be used.
|
259
|
-
* Additionally the dispatch_queue to invoke the completion block may also be specified.
|
260
|
-
* If NULL, dispatch_get_main_queue() is automatically used.
|
261
|
-
**/
|
262
|
-
- (void)asyncReadWithBlock:(void (^)(YapDatabaseReadTransaction *transaction))block
|
263
|
-
completionBlock:(dispatch_block_t)completionBlock
|
264
|
-
completionQueue:(dispatch_queue_t)completionQueue;
|
265
|
-
|
266
|
-
/**
|
267
|
-
* Read-write access to the database.
|
268
|
-
*
|
269
|
-
* Only a single read-write block can execute among all sibling connections.
|
270
|
-
* Thus this method may block if another sibling connection is currently executing a read-write block.
|
271
|
-
*
|
272
|
-
* This method is asynchronous.
|
273
|
-
**/
|
274
|
-
- (void)asyncReadWriteWithBlock:(void (^)(YapDatabaseReadWriteTransaction *transaction))block;
|
275
|
-
|
276
|
-
/**
|
277
|
-
* Read-write access to the database.
|
278
|
-
*
|
279
|
-
* Only a single read-write block can execute among all sibling connections.
|
280
|
-
* Thus the execution of the block may be delayed if another sibling connection
|
281
|
-
* is currently executing a read-write block.
|
282
|
-
*
|
283
|
-
* This method is asynchronous.
|
284
|
-
*
|
285
|
-
* An optional completion block may be used.
|
286
|
-
* The completionBlock will be invoked on the main thread (dispatch_get_main_queue()).
|
287
|
-
**/
|
288
|
-
- (void)asyncReadWriteWithBlock:(void (^)(YapDatabaseReadWriteTransaction *transaction))block
|
289
|
-
completionBlock:(dispatch_block_t)completionBlock;
|
290
|
-
|
291
|
-
/**
|
292
|
-
* Read-write access to the database.
|
293
|
-
*
|
294
|
-
* Only a single read-write block can execute among all sibling connections.
|
295
|
-
* Thus the execution of the block may be delayed if another sibling connection
|
296
|
-
* is currently executing a read-write block.
|
297
|
-
*
|
298
|
-
* This method is asynchronous.
|
299
|
-
*
|
300
|
-
* An optional completion block may be used.
|
301
|
-
* Additionally the dispatch_queue to invoke the completion block may also be specified.
|
302
|
-
* If NULL, dispatch_get_main_queue() is automatically used.
|
303
|
-
**/
|
304
|
-
- (void)asyncReadWriteWithBlock:(void (^)(YapDatabaseReadWriteTransaction *transaction))block
|
305
|
-
completionBlock:(dispatch_block_t)completionBlock
|
306
|
-
completionQueue:(dispatch_queue_t)completionQueue;
|
307
|
-
|
308
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
309
|
-
#pragma mark Long-Lived Transactions
|
310
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
311
|
-
|
312
|
-
/**
|
313
|
-
* Invoke this method to start a long-lived read-only transaction.
|
314
|
-
* This allows you to effectively create a stable state for the connection.
|
315
|
-
* This is most often used for connections that service the main thread for UI data.
|
316
|
-
*
|
317
|
-
* For a complete discussion, please see the wiki page:
|
318
|
-
* https://github.com/yaptv/YapDatabase/wiki/LongLivedReadTransactions
|
319
|
-
**/
|
320
|
-
- (NSArray *)beginLongLivedReadTransaction;
|
321
|
-
- (NSArray *)endLongLivedReadTransaction;
|
322
|
-
|
323
|
-
- (BOOL)isInLongLivedReadTransaction;
|
324
|
-
|
325
|
-
/**
|
326
|
-
* A long-lived read-only transaction is most often setup on a connection that is designed to be read-only.
|
327
|
-
* But sometimes we forget, and a read-write transaction gets added that uses the read-only connection.
|
328
|
-
* This will implicitly end the long-lived read-only transaction. Oops.
|
329
|
-
*
|
330
|
-
* This is a bug waiting to happen.
|
331
|
-
* And when it does happen, it will be one of those bugs that's nearly impossible to reproduce.
|
332
|
-
* So its better to have an early warning system to help you fix the bug before it occurs.
|
333
|
-
*
|
334
|
-
* For a complete discussion, please see the wiki page:
|
335
|
-
* https://github.com/yaptv/YapDatabase/wiki/LongLivedReadTransactions
|
336
|
-
*
|
337
|
-
* In debug mode (#if DEBUG), these exceptions are turned ON by default.
|
338
|
-
* In non-debug mode (#if !DEBUG), these exceptions are turned OFF by default.
|
339
|
-
**/
|
340
|
-
- (void)enableExceptionsForImplicitlyEndingLongLivedReadTransaction;
|
341
|
-
- (void)disableExceptionsForImplicitlyEndingLongLivedReadTransaction;
|
342
|
-
|
343
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
344
|
-
#pragma mark Changesets
|
345
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
346
|
-
|
347
|
-
/**
|
348
|
-
* A YapDatabaseModifiedNotification is posted for every readwrite transaction that makes changes to the database.
|
349
|
-
*
|
350
|
-
* Given one or more notifications, these methods allow you to easily
|
351
|
-
* query to see if a change affects a given collection, key, or combinary.
|
352
|
-
*
|
353
|
-
* This is most often used in conjunction with longLivedReadTransactions.
|
354
|
-
*
|
355
|
-
* For more information on longLivedReadTransaction, see the following wiki article:
|
356
|
-
* https://github.com/yaptv/YapDatabase/wiki/LongLivedReadTransactions
|
357
|
-
**/
|
358
|
-
|
359
|
-
// Query for any change to a collection
|
360
|
-
|
361
|
-
- (BOOL)hasChangeForCollection:(NSString *)collection inNotifications:(NSArray *)notifications;
|
362
|
-
- (BOOL)hasObjectChangeForCollection:(NSString *)collection inNotifications:(NSArray *)notifications;
|
363
|
-
- (BOOL)hasMetadataChangeForCollection:(NSString *)collection inNotifications:(NSArray *)notifications;
|
364
|
-
|
365
|
-
// Query for a change to a particular key/collection tuple
|
366
|
-
|
367
|
-
- (BOOL)hasChangeForKey:(NSString *)key
|
368
|
-
inCollection:(NSString *)collection
|
369
|
-
inNotifications:(NSArray *)notifications;
|
370
|
-
|
371
|
-
- (BOOL)hasObjectChangeForKey:(NSString *)key
|
372
|
-
inCollection:(NSString *)collection
|
373
|
-
inNotifications:(NSArray *)notifications;
|
374
|
-
|
375
|
-
- (BOOL)hasMetadataChangeForKey:(NSString *)key
|
376
|
-
inCollection:(NSString *)collection
|
377
|
-
inNotifications:(NSArray *)notifications;
|
378
|
-
|
379
|
-
// Query for a change to a particular set of keys in a collection
|
380
|
-
|
381
|
-
- (BOOL)hasChangeForAnyKeys:(NSSet *)keys
|
382
|
-
inCollection:(NSString *)collection
|
383
|
-
inNotifications:(NSArray *)notifications;
|
384
|
-
|
385
|
-
- (BOOL)hasObjectChangeForAnyKeys:(NSSet *)keys
|
386
|
-
inCollection:(NSString *)collection
|
387
|
-
inNotifications:(NSArray *)notifications;
|
388
|
-
|
389
|
-
- (BOOL)hasMetadataChangeForAnyKeys:(NSSet *)keys
|
390
|
-
inCollection:(NSString *)collection
|
391
|
-
inNotifications:(NSArray *)notifications;
|
392
|
-
|
393
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
394
|
-
#pragma mark Extensions
|
395
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
396
|
-
|
397
|
-
/**
|
398
|
-
* Creates or fetches the extension with the given name.
|
399
|
-
* If this connection has not yet initialized the proper extension connection, it is done automatically.
|
400
|
-
*
|
401
|
-
* @return
|
402
|
-
* A subclass of YapDatabaseExtensionConnection,
|
403
|
-
* according to the type of extension registered under the given name.
|
404
|
-
*
|
405
|
-
* One must register an extension with the database before it can be accessed from within connections or transactions.
|
406
|
-
* After registration everything works automatically using just the registered extension name.
|
407
|
-
*
|
408
|
-
* @see YapDatabase registerExtension:withName:
|
409
|
-
**/
|
410
|
-
- (id)extension:(NSString *)extensionName;
|
411
|
-
- (id)ext:(NSString *)extensionName; // <-- Shorthand (same as extension: method)
|
412
|
-
|
413
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
414
|
-
#pragma mark Memory
|
415
|
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
416
|
-
|
417
|
-
/**
|
418
|
-
* This method may be used to flush the internal caches used by the connection,
|
419
|
-
* as well as flushing pre-compiled sqlite statements.
|
420
|
-
* Depending upon how often you use the database connection,
|
421
|
-
* you may want to be more or less aggressive on how much stuff you flush.
|
422
|
-
*
|
423
|
-
* YapDatabaseConnectionFlushMemoryFlags_None:
|
424
|
-
* No-op. Doesn't flush anything.
|
425
|
-
*
|
426
|
-
* YapDatabaseConnectionFlushMemoryFlags_Caches:
|
427
|
-
* Flushes all caches, including the object cache and metadata cache.
|
428
|
-
*
|
429
|
-
* YapDatabaseConnectionFlushMemoryFlags_Statements:
|
430
|
-
* Flushes all pre-compiled sqlite statements.
|
431
|
-
*
|
432
|
-
* YapDatabaseConnectionFlushMemoryFlags_All:
|
433
|
-
* Full flush of all caches and pre-compiled sqlite statements.
|
434
|
-
**/
|
435
|
-
- (void)flushMemoryWithFlags:(YapDatabaseConnectionFlushMemoryFlags)flags;
|
436
|
-
|
437
|
-
#if TARGET_OS_IPHONE
|
438
|
-
/**
|
439
|
-
* When a UIApplicationDidReceiveMemoryWarningNotification is received,
|
440
|
-
* the code automatically invokes flushMemoryWithFlags and passes the set flags.
|
441
|
-
*
|
442
|
-
* The default value is YapDatabaseConnectionFlushMemoryFlags_All.
|
443
|
-
*
|
444
|
-
* @see flushMemoryWithFlags:
|
445
|
-
**/
|
446
|
-
@property (atomic, assign, readwrite) YapDatabaseConnectionFlushMemoryFlags autoFlushMemoryFlags;
|
447
|
-
#endif
|
448
|
-
|
449
|
-
@end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
#import <Foundation/Foundation.h>
|
2
|
-
|
3
|
-
#import "YapDatabaseExtensionConnection.h"
|
4
|
-
#import "YapDatabaseExtensionTransaction.h"
|
5
|
-
|
6
|
-
|
7
|
-
@interface YapDatabaseExtension : NSObject
|
8
|
-
|
9
|
-
/**
|
10
|
-
* After an extension has been successfully registered with a database,
|
11
|
-
* the registeredName property will be set by the database.
|
12
|
-
**/
|
13
|
-
@property (atomic, copy, readonly) NSString *registeredName;
|
14
|
-
|
15
|
-
@end
|