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.
Files changed (294) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +3 -1
  4. data/lib/yapper.rb +3 -3
  5. data/lib/yapper/db.rb +61 -4
  6. data/lib/yapper/document/persistence.rb +4 -0
  7. data/lib/yapper/document/selection.rb +13 -0
  8. data/lib/yapper/version.rb +1 -1
  9. data/motion-yapper.gemspec +1 -1
  10. data/spec/integration/search_spec.rb +111 -0
  11. data/vendor/Podfile.lock +11 -7
  12. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.bridgesupport +16 -2
  13. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.h +10 -7
  14. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.m +20 -2
  15. metadata +19 -297
  16. data/vendor/Pods/.build/libPods-CocoaLumberjack.a +0 -0
  17. data/vendor/Pods/.build/libPods-NSData+MD5Digest.a +0 -0
  18. data/vendor/Pods/.build/libPods-YapDatabase.a +0 -0
  19. data/vendor/Pods/.build/libPods.a +0 -0
  20. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDASLLogger.h +0 -41
  21. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDAbstractDatabaseLogger.h +0 -102
  22. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDContextFilterLogFormatter.h +0 -63
  23. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDDispatchQueueLogFormatter.h +0 -128
  24. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDFileLogger.h +0 -369
  25. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog+LOGV.h +0 -99
  26. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog.h +0 -634
  27. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDMultiFormatter.h +0 -30
  28. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDTTYLogger.h +0 -181
  29. data/vendor/Pods/BuildHeaders/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
  30. data/vendor/Pods/BuildHeaders/YapDatabase/NSDictionary+YapDatabase.h +0 -8
  31. data/vendor/Pods/BuildHeaders/YapDatabase/YapCache.h +0 -91
  32. data/vendor/Pods/BuildHeaders/YapDatabase/YapCollectionKey.h +0 -23
  33. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabase.h +0 -547
  34. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnection.h +0 -449
  35. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnectionState.h +0 -29
  36. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseDefaults.h +0 -37
  37. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtension.h +0 -15
  38. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionConnection.h +0 -11
  39. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionPrivate.h +0 -444
  40. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionTransaction.h +0 -11
  41. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredView.h +0 -81
  42. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewConnection.h +0 -12
  43. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewPrivate.h +0 -17
  44. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTransaction.h +0 -39
  45. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTypes.h +0 -32
  46. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearch.h +0 -89
  47. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchConnection.h +0 -32
  48. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchPrivate.h +0 -77
  49. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
  50. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchTransaction.h +0 -68
  51. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseLogging.h +0 -158
  52. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseManager.h +0 -17
  53. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabasePrivate.h +0 -446
  54. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseQuery.h +0 -42
  55. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationship.h +0 -35
  56. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipConnection.h +0 -29
  57. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdge.h +0 -163
  58. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdgePrivate.h +0 -79
  59. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipNode.h +0 -99
  60. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipOptions.h +0 -59
  61. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipPrivate.h +0 -125
  62. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipTransaction.h +0 -384
  63. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndex.h +0 -149
  64. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexConnection.h +0 -33
  65. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexPrivate.h +0 -83
  66. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetup.h +0 -33
  67. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetupPrivate.h +0 -18
  68. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexTransaction.h +0 -58
  69. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseStatement.h +0 -13
  70. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseString.h +0 -121
  71. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseTransaction.h +0 -651
  72. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseView.h +0 -127
  73. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChange.h +0 -272
  74. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChangePrivate.h +0 -94
  75. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewConnection.h +0 -116
  76. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappings.h +0 -842
  77. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappingsPrivate.h +0 -72
  78. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewOptions.h +0 -63
  79. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPage.h +0 -36
  80. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPageMetadata.h +0 -27
  81. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPrivate.h +0 -170
  82. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewRangeOptions.h +0 -330
  83. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewRangeOptionsPrivate.h +0 -17
  84. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTransaction.h +0 -498
  85. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTypes.h +0 -99
  86. data/vendor/Pods/BuildHeaders/YapDatabase/YapMemoryTable.h +0 -74
  87. data/vendor/Pods/BuildHeaders/YapDatabase/YapNull.h +0 -17
  88. data/vendor/Pods/BuildHeaders/YapDatabase/YapSet.h +0 -41
  89. data/vendor/Pods/BuildHeaders/YapDatabase/YapTouch.h +0 -15
  90. data/vendor/Pods/CocoaLumberjack/LICENSE.txt +0 -18
  91. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.h +0 -41
  92. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.m +0 -100
  93. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.h +0 -102
  94. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.m +0 -727
  95. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.h +0 -369
  96. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.m +0 -1539
  97. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog+LOGV.h +0 -99
  98. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.h +0 -634
  99. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.m +0 -1208
  100. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.h +0 -181
  101. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.m +0 -1520
  102. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.h +0 -63
  103. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.m +0 -191
  104. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.h +0 -128
  105. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.m +0 -253
  106. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.h +0 -30
  107. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.m +0 -127
  108. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/README.txt +0 -7
  109. data/vendor/Pods/CocoaLumberjack/README.markdown +0 -74
  110. data/vendor/Pods/Headers/CocoaLumberjack/DDASLLogger.h +0 -41
  111. data/vendor/Pods/Headers/CocoaLumberjack/DDAbstractDatabaseLogger.h +0 -102
  112. data/vendor/Pods/Headers/CocoaLumberjack/DDContextFilterLogFormatter.h +0 -63
  113. data/vendor/Pods/Headers/CocoaLumberjack/DDDispatchQueueLogFormatter.h +0 -128
  114. data/vendor/Pods/Headers/CocoaLumberjack/DDFileLogger.h +0 -369
  115. data/vendor/Pods/Headers/CocoaLumberjack/DDLog+LOGV.h +0 -99
  116. data/vendor/Pods/Headers/CocoaLumberjack/DDLog.h +0 -634
  117. data/vendor/Pods/Headers/CocoaLumberjack/DDMultiFormatter.h +0 -30
  118. data/vendor/Pods/Headers/CocoaLumberjack/DDTTYLogger.h +0 -181
  119. data/vendor/Pods/Headers/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
  120. data/vendor/Pods/Headers/YapDatabase/YapCollectionKey.h +0 -23
  121. data/vendor/Pods/Headers/YapDatabase/YapDatabase.h +0 -547
  122. data/vendor/Pods/Headers/YapDatabase/YapDatabaseConnection.h +0 -449
  123. data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtension.h +0 -15
  124. data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionConnection.h +0 -11
  125. data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionTransaction.h +0 -11
  126. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredView.h +0 -81
  127. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewConnection.h +0 -12
  128. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTransaction.h +0 -39
  129. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTypes.h +0 -32
  130. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearch.h +0 -89
  131. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchConnection.h +0 -32
  132. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
  133. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchTransaction.h +0 -68
  134. data/vendor/Pods/Headers/YapDatabase/YapDatabaseQuery.h +0 -42
  135. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationship.h +0 -35
  136. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipConnection.h +0 -29
  137. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipEdge.h +0 -163
  138. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipNode.h +0 -99
  139. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipOptions.h +0 -59
  140. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipTransaction.h +0 -384
  141. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndex.h +0 -149
  142. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexConnection.h +0 -33
  143. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexSetup.h +0 -33
  144. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexTransaction.h +0 -58
  145. data/vendor/Pods/Headers/YapDatabase/YapDatabaseTransaction.h +0 -651
  146. data/vendor/Pods/Headers/YapDatabase/YapDatabaseView.h +0 -127
  147. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewChange.h +0 -272
  148. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewConnection.h +0 -116
  149. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewMappings.h +0 -842
  150. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewOptions.h +0 -63
  151. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewRangeOptions.h +0 -330
  152. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTransaction.h +0 -498
  153. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTypes.h +0 -99
  154. data/vendor/Pods/Headers/YapDatabase/YapSet.h +0 -41
  155. data/vendor/Pods/Headers/____Pods-CocoaLumberjack-prefix.h +0 -7
  156. data/vendor/Pods/Headers/____Pods-NSData+MD5Digest-prefix.h +0 -5
  157. data/vendor/Pods/Headers/____Pods-YapDatabase-prefix.h +0 -5
  158. data/vendor/Pods/Headers/____Pods-environment.h +0 -38
  159. data/vendor/Pods/Manifest.lock +0 -22
  160. data/vendor/Pods/NSData+MD5Digest/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
  161. data/vendor/Pods/NSData+MD5Digest/NSData+MD5Digest/NSData+MD5Digest.m +0 -39
  162. data/vendor/Pods/NSData+MD5Digest/README.md +0 -11
  163. data/vendor/Pods/Pods-CocoaLumberjack-Private.xcconfig +0 -5
  164. data/vendor/Pods/Pods-CocoaLumberjack-dummy.m +0 -5
  165. data/vendor/Pods/Pods-CocoaLumberjack-prefix.pch +0 -7
  166. data/vendor/Pods/Pods-CocoaLumberjack.xcconfig +0 -0
  167. data/vendor/Pods/Pods-NSData+MD5Digest-Private.xcconfig +0 -5
  168. data/vendor/Pods/Pods-NSData+MD5Digest-dummy.m +0 -5
  169. data/vendor/Pods/Pods-NSData+MD5Digest-prefix.pch +0 -5
  170. data/vendor/Pods/Pods-NSData+MD5Digest.xcconfig +0 -0
  171. data/vendor/Pods/Pods-YapDatabase-Private.xcconfig +0 -5
  172. data/vendor/Pods/Pods-YapDatabase-dummy.m +0 -5
  173. data/vendor/Pods/Pods-YapDatabase-prefix.pch +0 -5
  174. data/vendor/Pods/Pods-YapDatabase.xcconfig +0 -1
  175. data/vendor/Pods/Pods-acknowledgements.markdown +0 -59
  176. data/vendor/Pods/Pods-acknowledgements.plist +0 -97
  177. data/vendor/Pods/Pods-dummy.m +0 -5
  178. data/vendor/Pods/Pods-environment.h +0 -38
  179. data/vendor/Pods/Pods-resources.sh +0 -68
  180. data/vendor/Pods/Pods.xcconfig +0 -5
  181. data/vendor/Pods/Pods.xcodeproj/project.pbxproj +0 -4807
  182. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-CocoaLumberjack.xcscheme +0 -59
  183. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-NSData+MD5Digest.xcscheme +0 -59
  184. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-YapDatabase.xcscheme +0 -59
  185. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods.xcscheme +0 -59
  186. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/xcschememanagement.plist +0 -31
  187. data/vendor/Pods/YapDatabase/LICENSE.txt +0 -18
  188. data/vendor/Pods/YapDatabase/README.md +0 -32
  189. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/Internal/YapDatabaseFilteredViewPrivate.h +0 -17
  190. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.h +0 -81
  191. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.m +0 -159
  192. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewConnection.h +0 -12
  193. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewConnection.m +0 -41
  194. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.h +0 -39
  195. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.m +0 -1235
  196. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTypes.h +0 -32
  197. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/Internal/YapDatabaseFullTextSearchPrivate.h +0 -77
  198. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearch.h +0 -89
  199. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearch.m +0 -146
  200. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.h +0 -32
  201. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.m +0 -298
  202. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
  203. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchSnippetOptions.m +0 -95
  204. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.h +0 -68
  205. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.m +0 -1403
  206. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/Internal/YapDatabaseExtensionPrivate.h +0 -444
  207. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.h +0 -15
  208. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.m +0 -83
  209. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.h +0 -11
  210. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.m +0 -46
  211. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.h +0 -11
  212. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.m +0 -204
  213. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipEdgePrivate.h +0 -79
  214. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipPrivate.h +0 -125
  215. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.h +0 -35
  216. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.m +0 -129
  217. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.h +0 -29
  218. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.m +0 -802
  219. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.h +0 -163
  220. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.m +0 -408
  221. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipNode.h +0 -99
  222. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.h +0 -59
  223. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.m +0 -29
  224. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.h +0 -384
  225. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.m +0 -5254
  226. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexPrivate.h +0 -83
  227. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexSetupPrivate.h +0 -18
  228. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.h +0 -149
  229. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.m +0 -161
  230. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.h +0 -33
  231. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.m +0 -331
  232. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.h +0 -33
  233. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.m +0 -245
  234. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.h +0 -58
  235. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.m +0 -1269
  236. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewChangePrivate.h +0 -94
  237. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewMappingsPrivate.h +0 -72
  238. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPage.h +0 -36
  239. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPage.mm +0 -296
  240. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPageMetadata.h +0 -27
  241. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPageMetadata.m +0 -28
  242. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPrivate.h +0 -170
  243. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewRangeOptionsPrivate.h +0 -17
  244. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.h +0 -272
  245. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.m +0 -2500
  246. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.h +0 -842
  247. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.m +0 -1714
  248. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewRangeOptions.h +0 -330
  249. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewRangeOptions.m +0 -141
  250. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.h +0 -127
  251. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.m +0 -194
  252. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.h +0 -116
  253. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.m +0 -888
  254. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.h +0 -63
  255. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.m +0 -27
  256. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.h +0 -498
  257. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.m +0 -4986
  258. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTypes.h +0 -99
  259. data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.h +0 -8
  260. data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.m +0 -19
  261. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.h +0 -91
  262. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.m +0 -465
  263. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseConnectionState.h +0 -29
  264. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseConnectionState.m +0 -48
  265. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.h +0 -37
  266. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.m +0 -83
  267. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseLogging.h +0 -158
  268. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseLogging.m +0 -73
  269. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseManager.h +0 -17
  270. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseManager.m +0 -56
  271. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabasePrivate.h +0 -446
  272. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseStatement.h +0 -13
  273. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseStatement.m +0 -26
  274. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseString.h +0 -121
  275. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapMemoryTable.h +0 -74
  276. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapMemoryTable.m +0 -603
  277. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.h +0 -17
  278. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.m +0 -35
  279. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapTouch.h +0 -15
  280. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapTouch.m +0 -31
  281. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.h +0 -23
  282. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.m +0 -199
  283. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.h +0 -42
  284. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.m +0 -96
  285. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapSet.h +0 -41
  286. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapSet.m +0 -82
  287. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.h +0 -547
  288. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.m +0 -2013
  289. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.h +0 -449
  290. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.m +0 -4046
  291. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.h +0 -651
  292. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.m +0 -5602
  293. data/vendor/Pods/build-iPhoneSimulator/Pods.bridgesupport +0 -3172
  294. data/vendor/Pods/build-iPhoneSimulator/libPods.a +0 -0
@@ -1,17 +0,0 @@
1
- #import "YapDatabaseViewRangeOptions.h"
2
-
3
- /**
4
- * This header file is PRIVATE, and is only to be used by the YapDatabaseView classes.
5
- **/
6
-
7
- @interface YapDatabaseViewRangeOptions ()
8
-
9
- /**
10
- * This method returns a copy with the pin value switched.
11
- *
12
- * That is, if the range was pinned to the beginning, the returned copy will be pinned to the end.
13
- * And vice versa.
14
- **/
15
- - (id)copyAndReverse;
16
-
17
- @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