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,330 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
-
3
-
4
- /**
5
- * Range offsets are specified from either the beginning or end.
6
- *
7
- * @see fixedRangeWithLength:offset:from:
8
- * @see flexibleRangeWithStartingLength:startingOffset:from:
9
- **/
10
- typedef enum {
11
- YapDatabaseViewBeginning = 0, // index == 0
12
- YapDatabaseViewEnd = 1, // index == last
13
-
14
- } YapDatabaseViewPin;
15
-
16
- /**
17
- * Grow options allow you to specify in which direction flexible ranges can grow.
18
- *
19
- * @see growOptions
20
- **/
21
- typedef enum {
22
- YapDatabaseViewGrowPinSide = 1 << 0,
23
- YapDatabaseViewGrowNonPinSide = 1 << 1,
24
-
25
- YapDatabaseViewGrowInRangeOnly = 0,
26
- YapDatabaseViewGrowOnBothSides = (YapDatabaseViewGrowPinSide | YapDatabaseViewGrowNonPinSide)
27
-
28
- } YapDatabaseViewGrowOptions;
29
-
30
- /**
31
- * Range options allow you to specify a particular range of a group.
32
- *
33
- * For example, if a group contains thousands of items,
34
- * but you only want to display the most recent 50 items in your tableView,
35
- * then you can easily use range options to accomplish this.
36
- *
37
- * YapDatabaseViewRangeOptions are plugged into YapDatabaseViewMappings.
38
- *
39
- * @see YapDatabaseViewMappings setRangeOptions:forGroup:
40
- **/
41
- @interface YapDatabaseViewRangeOptions : NSObject <NSCopying>
42
-
43
- /**
44
- * There are 2 types of supported ranges: Fixed & Flexible
45
- *
46
- * A fixed range is similar to using a LIMIT & OFFSET in a SQL query.
47
- * That is, it represents a designated range that doesn't change.
48
- *
49
- * You create a fixed range by specifying a desired length
50
- * and an offset from either the beginning or end.
51
- *
52
- * @param length
53
- * The desired length of the range.
54
- * The length doesn't need to be valid at this point in time.
55
- * For example, if the group only has 4 items, you can still specify a length of 20 if that is the desired length.
56
- * The mappings will automatically use a length of 4 to start, and automatically expand up to 20.
57
- *
58
- * @param offset
59
- * The offset from one either the beginning or end of the group.
60
- *
61
- * @param beginningOrEnd
62
- * Either YapDatabaseViewBeginning or YapDatabaseViewEnd.
63
- *
64
- * Using YapDatabaseViewMappings along with a fixed range provides some unique features:
65
- *
66
- * - If you specify an offset from the end of the group (YapDatabaseViewEnd),
67
- * you are essentially "pinning" the range to the end, and it will stay pinned that way regardless of
68
- * inserted or deleted items elsewhere in the group.
69
- *
70
- * For example: If you pin the range to the end, with an offset of zero, and a length of 20,
71
- * then the range will always specify the last 20 items in the group,
72
- * even as the group length (as a whole) increases or decreases.
73
- *
74
- * - The changeset processing will automatically create the proper row changes to match what you want.
75
- *
76
- * For example: You have a fixed range with length 20, pinned to the beginning with an offset of 0,
77
- * and a new item is inserted at index 0. The changeset processing will automatically give you a row
78
- * insert at index 0, and a row delete at the end of your range to properly account for the row
79
- * that got pushed outside your range.
80
- *
81
- * Thus you get row animations for free, even when only displaying a subset.
82
- * And all the math is already done for you.
83
- **/
84
- + (YapDatabaseViewRangeOptions *)fixedRangeWithLength:(NSUInteger)length
85
- offset:(NSUInteger)offset
86
- from:(YapDatabaseViewPin)beginningOrEnd;
87
-
88
- /**
89
- * There are 2 types of supported ranges: Fixed & Flexible
90
- *
91
- * A flexible range is designed to grow and shrink.
92
- * To explain this concept, consider Apple's SMS Messages app:
93
- *
94
- * When you go into a conversation (tap on a persons name),
95
- * the messages app starts by displaying the most recent 50 messages (with the most recent at bottom).
96
- * Although there might be thousands of old messages between you and the other person,
97
- * only 50 are in the view to begin with.
98
- * As you send and/or receive messages within the view, the length will grow.
99
- * And similarly, if you manually delete messages, the length will shrink.
100
- *
101
- * Flexible ranges are designed to handle these types of user interfaces.
102
- * They're also quite customizeable to handle a number of different situations.
103
- *
104
- * You create a flexible range by specifying an starting length
105
- * and an offset from either the beginning or end.
106
- *
107
- * @param length
108
- * The desired starting length of the range.
109
- * The length doesn't need to be valid at this point in time.
110
- * For example, if the group only has 4 items, you can still specify a length of 20.
111
- * The mappings will automatically correct the length as appropriate.
112
- *
113
- * @param offset
114
- * The offset from one either the beginning or end of the group.
115
- *
116
- * @param beginningOrEnd
117
- * Either YapDatabaseViewBeginning or YapDatabaseViewEnd.
118
- *
119
- * Using YapDatabaseViewMappings along with a flexible range provides some unique features:
120
- *
121
- * - If you specify an offset from the end of the group (YapDatabaseViewEnd),
122
- * you are essentially "pinning" the range to the end, and it will stay pinned that way regardless of
123
- * inserted or deleted items elsewhere in the group.
124
- *
125
- * For example: If you pin the range to the end, with an offset of zero,
126
- * then the range length will grow as items are added to the end.
127
- *
128
- * - The changeset processing will automatically create the proper row changes to match what you want.
129
- *
130
- * Thus you get row animations for free, even when only displaying a subset.
131
- * And all the math is already done for you.
132
- **/
133
- + (YapDatabaseViewRangeOptions *)flexibleRangeWithLength:(NSUInteger)length
134
- offset:(NSUInteger)offset
135
- from:(YapDatabaseViewPin)beginningOrEnd;
136
-
137
- /**
138
- * The current length of the range.
139
- *
140
- * When rangeOptions get plugged into mappings, the length is automatically updated to reflect the available length.
141
- *
142
- * For a fixed range, the length will always be less than or equal to the original length.
143
- * For a flexible range, the length will grow and shrink as items get inserted and removed from the original range.
144
- **/
145
- @property (nonatomic, assign, readonly) NSUInteger length;
146
-
147
- /**
148
- * The current offset of the range, relative to the pin (beginning or end of the group).
149
- *
150
- * For a fixed range, the offset never changes.
151
- * For a flexible range, the offset will grow and shrink as items get inserted and removed between the range and pin.
152
- **/
153
- @property (nonatomic, assign, readonly) NSUInteger offset;
154
-
155
- /**
156
- * The pin value represents the end from which the offset is calculated.
157
- * For example, assume a group contains 50 items and:
158
- *
159
- * - length=10, offset=10, pin=YapDatabaseViewBeginning => the range is [10-19](inclusive) (10 back from 0)
160
- *
161
- * - length=10, offset=10, pin=YapDatabaseViewEnd => the range is [30-39](inclusive) (10 back from 49)
162
- **/
163
- @property (nonatomic, assign, readonly) YapDatabaseViewPin pin;
164
-
165
- /**
166
- * There are 2 types of supported ranges: Fixed & Flexible
167
- **/
168
- @property (nonatomic, readonly) BOOL isFixedRange;
169
- @property (nonatomic, readonly) BOOL isFlexibleRange;
170
-
171
- /**
172
- * For FIXED ranges:
173
- * - the maxLength is readonly.
174
- * - it will always equal the length originally specified.
175
- *
176
- * For FLEXIBLE ranges:
177
- * - the maxLength allows you to specify a maximum length in which the range can grow.
178
- *
179
- * In particular, if the range overflows the maxLength, then the changeset processing will automatically
180
- * trim items from the range (on the non-pin-side) to keep the range length within this maxLength.
181
- *
182
- * For example, imagine you're displaying log entries in a tableView.
183
- * The range is pinned to the end, so as new log entries get appended to the database, they automatically get
184
- * inserted into the tableView. This allows the tableView to grow as the log grows. However, you don't want the
185
- * tableView growing too big, so you can set the maxLength in order to prevent this. That way, your tableView
186
- * grows as the logs come in (as expected). But if your tableView starts to get too big,
187
- * then the oldest log entries in the tableView start to fall off as new entries arrive.
188
- * This is eqivalent to switching from a flexible range to a fixed range,
189
- * but happens automatically without you having to write extra code to handle the edge case.
190
- *
191
- * By default there is no maxLength, and thus the default maxLength is NSUIntegerMax.
192
- **/
193
- @property (nonatomic, readwrite) NSUInteger maxLength;
194
-
195
- /**
196
- * For FIXED ranges:
197
- * - the minLength is readonly.
198
- * - it will always equal zero.
199
- *
200
- * For FLEXIBLE ranges:
201
- * - the minLength allows you to specify a minimum length that the range should keep (if possible).
202
- *
203
- * In particular, if the range underflows the minLength, then the changeset processing will automatically
204
- * adjust the offset or expand the range in order to keep entries in the view.
205
- *
206
- * This is sometimes useful if items can get deleted from your range.
207
- *
208
- * By default there is no minLength, and thus the default minLength is zero.
209
- **/
210
- @property (nonatomic, readwrite) NSUInteger minLength;
211
-
212
- /**
213
- * GrowOptions ONLY apply to FLEXIBLE ranges.
214
- *
215
- * The growOptions allow you to specify in which direction(s) the range may grow.
216
- * Let's look at a few concrete examples.
217
- *
218
- * Example #1
219
- *
220
- * We're using a flexible range, with an offset of zero, pinned to the beginning.
221
- * We're displaying news items, and the most recent items get inserted at index 0.
222
- * The group currently contains thousands of items, and our range has a starting length of 50.
223
- * If a new item gets inserted (at the beginning), we want it to get added to our range.
224
- * So we would set our growOptions to be YapDatabaseViewGrowPinSide (this is the default value).
225
- *
226
- * Example #2
227
- *
228
- * We're using a flexible range, with an offset of zero, pinned to the end.
229
- * We're displaying log entries, with the most recent items getting appended to the end.
230
- * The group currently contains thousands of items, and our range has a starting length of 50.
231
- * If a new log item gets inserted (at the end), we want it to get added to our range.
232
- * So we would set our growOptions to be YapDatabaseViewGrowPinSide (this is the default value).
233
- *
234
- * Example #3
235
- *
236
- * We're making a UI that is somewhat akin to Facebook's news feed.
237
- * That is, the most recent items come in at the top,
238
- * but if you scroll to the bottom we automatically download older posts.
239
- * However, we don't want to limit how far the user can scroll down.
240
- * That is, if the user is bored, we're going to allow them to scroll down for
241
- * however long we can fetch old items from the server.
242
- * But obviously we can't allow the length of our tableView to grow infinitely long.
243
- * So to accomplish this, we're going to use flexible ranges,
244
- * and we're going to shift the length as the user scrolls down.
245
- * To start with, we only have the 30 most recent posts in the database.
246
- * And we set our flexible range as: length=30, offset=0, pin=YapDatabaseViewBeginning.
247
- * Additionally we set our growOptions to: YapDatabaseViewGrowOnBothSides.
248
- * Thus if we download new items, they'll get included in the range.
249
- * And if we fetch older items, they'll also get included in the range.
250
- * Now as the the user scrolls down, and we fetch more and more old items,
251
- * we eventually get to the point were we shift the range.
252
- * So when the range length gets to some max length that we want to support, we shift to a new flexible range:
253
- * length=max, offset=0, pin=YapDatabaseViewEnd, growOptions=YapDatabaseViewGrowPinSide, maxLength=max
254
- * This new range will keep the tableView length capped at max, and continually load older content as it gets fetched.
255
- * To allow the user to scroll back up, we just increment the offset as the go.
256
- * When they eventually get back up to the top, we reset the flexible range to its original value.
257
- *
258
- *
259
- * To explain the different options, consider the following picture:
260
- *
261
- * - - - - -
262
- * | |x|x|x| | <-- x marks the range
263
- * - - - - -
264
- * 0 1 2 3 4
265
- *
266
- * groupCount = 5
267
- * flexibleRange: length=3, offset=1, pin=YapDatabaseViewBeginning, growOptions=YapDatabaseViewGrowPinSide
268
- *
269
- * Now an item gets inserted at index 1 as follows:
270
- *
271
- * - - - - - -
272
- * | |?|x|x|x| | <-- is ? added to the flexible range?
273
- * - - - - - -
274
- * 0 1 2 3 4 5
275
- *
276
- * Does the item get added to the flexible range (with the given config options)?
277
- * The answer is YES.
278
- *
279
- * - - - - - -
280
- * | |x|x|x|x| | <-- YES (based on pin & growOptions)
281
- * - - - - - -
282
- * 0 1 2 3 4 5
283
- *
284
- * Because the flexible range is pinned to the beginning, and grows pin side.
285
- * So if anything gets inserted between what was originally at index 0, and what was originally at index 1,
286
- * then those items get added to the flexible range.
287
- *
288
- * Notice that after the insert, the offset remains set at 1.
289
- * Notice that the answer would be NO if the flexible range was pinned to the end (with the same growOptions).
290
- *
291
- * Now let's see what happens if something gets inserted at the end:
292
- *
293
- * - - - - - - -
294
- * | |x|x|x|x|?| | <-- is ? added to the flexible range?
295
- * - - - - - - -
296
- * 0 1 2 3 4 5 6
297
- *
298
- * Does the item get added to the flexible range (with the given config options)?
299
- * The answer is NO.
300
- *
301
- * - - - - - - -
302
- * | |x|x|x|x| | | <-- NO (based on pin & growOptions)
303
- * - - - - - - -
304
- * 0 1 2 3 4 5 6
305
- *
306
- * Because the flexible range is pinned to the beginning, and grows pin side.
307
- *
308
- * Notice that after the insert, the offset remains set at 1.
309
- * Notice that the answer would be YES if the flexible range was pinned to the end (with the same growOptions).
310
- *
311
- * - - - - - - - - - - - - - - - -
312
- * |?| |x|x|x|x| | | => NEVER => | | |x|x|x|x| | |
313
- * - - - - - - - - - - - - - - - -
314
- * 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7
315
- *
316
- * - - - - - - - - - - - - - - - - - -
317
- * | | |x|?|x|x|x| | | => ALWAYS => | | |x|x|x|x|x| | |
318
- * - - - - - - - - - - - - - - - - - -
319
- * 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8
320
- **/
321
- @property (nonatomic, readwrite) YapDatabaseViewGrowOptions growOptions;
322
-
323
- /**
324
- * Various copy options.
325
- **/
326
- - (id)copyWithNewLength:(NSUInteger)newLength;
327
- - (id)copyWithNewOffset:(NSUInteger)newOffset;
328
- - (id)copyWithNewLength:(NSUInteger)newLength newOffset:(NSUInteger)newOffset;
329
-
330
- @end
@@ -1,141 +0,0 @@
1
- #import "YapDatabaseViewRangeOptions.h"
2
-
3
-
4
- @implementation YapDatabaseViewRangeOptions
5
-
6
- @synthesize length = length;
7
- @synthesize offset = offset;
8
- @synthesize pin = pin;
9
-
10
- @synthesize isFixedRange = isFixedRange;
11
- @dynamic isFlexibleRange;
12
-
13
- @synthesize maxLength = maxLength;
14
- @synthesize minLength = minLength;
15
-
16
- @synthesize growOptions = growOptions;
17
-
18
- + (YapDatabaseViewRangeOptions *)fixedRangeWithLength:(NSUInteger)length
19
- offset:(NSUInteger)offset
20
- from:(YapDatabaseViewPin)pin
21
- {
22
- if (length == 0)
23
- return nil;
24
-
25
- // Validate pin
26
- if (pin > YapDatabaseViewEnd)
27
- pin = YapDatabaseViewEnd;
28
-
29
- YapDatabaseViewRangeOptions *rangeOpts = [[YapDatabaseViewRangeOptions alloc] init];
30
- rangeOpts->length = length;
31
- rangeOpts->offset = offset;
32
- rangeOpts->pin = pin;
33
- rangeOpts->isFixedRange = YES;
34
- rangeOpts->maxLength = length;
35
- rangeOpts->minLength = 0;
36
- rangeOpts->growOptions = YapDatabaseViewGrowPinSide;
37
-
38
- return rangeOpts;
39
- }
40
-
41
- + (YapDatabaseViewRangeOptions *)flexibleRangeWithLength:(NSUInteger)length
42
- offset:(NSUInteger)offset
43
- from:(YapDatabaseViewPin)pin
44
- {
45
- if (length == 0)
46
- return nil;
47
-
48
- // Validate pin
49
- if (pin > YapDatabaseViewEnd)
50
- pin = YapDatabaseViewEnd;
51
-
52
- YapDatabaseViewRangeOptions *rangeOpts = [[YapDatabaseViewRangeOptions alloc] init];
53
- rangeOpts->length = length;
54
- rangeOpts->offset = offset;
55
- rangeOpts->pin = pin;
56
- rangeOpts->isFixedRange = NO;
57
- rangeOpts->maxLength = NSUIntegerMax;
58
- rangeOpts->minLength = 0;
59
- rangeOpts->growOptions = YapDatabaseViewGrowPinSide;
60
-
61
- return rangeOpts;
62
- }
63
-
64
- - (BOOL)isFlexibleRange
65
- {
66
- return !isFixedRange;
67
- }
68
-
69
- - (void)setMaxLength:(NSUInteger)newMaxLength
70
- {
71
- maxLength = MAX(newMaxLength, minLength);
72
- }
73
-
74
- - (void)setMinLength:(NSUInteger)newMinLength
75
- {
76
- minLength = MIN(newMinLength, maxLength);
77
- }
78
-
79
- - (void)setGrowOptions:(YapDatabaseViewGrowOptions)newGrowOptions
80
- {
81
- // validate growOptions
82
-
83
- if (growOptions > YapDatabaseViewGrowOnBothSides)
84
- growOptions = YapDatabaseViewGrowPinSide; // Default
85
- else
86
- growOptions = newGrowOptions;
87
- }
88
-
89
- #pragma mark Copy
90
-
91
- - (id)copyWithZone:(NSZone *)zone
92
- {
93
- YapDatabaseViewRangeOptions *copy = [[YapDatabaseViewRangeOptions alloc] init];
94
- copy->length = length;
95
- copy->offset = offset;
96
- copy->pin = pin;
97
- copy->isFixedRange = isFixedRange;
98
- copy->maxLength = maxLength;
99
- copy->minLength = minLength;
100
- copy->growOptions = growOptions;
101
-
102
- return copy;
103
- }
104
-
105
- - (id)copyWithNewLength:(NSUInteger)newLength
106
- {
107
- YapDatabaseViewRangeOptions *copy = [self copy];
108
- copy->length = newLength;
109
-
110
- return copy;
111
- }
112
-
113
- - (id)copyWithNewOffset:(NSUInteger)newOffset
114
- {
115
- YapDatabaseViewRangeOptions *copy = [self copy];
116
- copy->offset = newOffset;
117
-
118
- return copy;
119
- }
120
-
121
- - (id)copyWithNewLength:(NSUInteger)newLength newOffset:(NSUInteger)newOffset
122
- {
123
- YapDatabaseViewRangeOptions *copy = [self copy];
124
- copy->length = newLength;
125
- copy->offset = newOffset;
126
-
127
- return copy;
128
- }
129
-
130
- - (id)copyAndReverse
131
- {
132
- YapDatabaseViewRangeOptions *copy = [self copy];
133
- if (copy->pin == YapDatabaseViewBeginning)
134
- copy->pin = YapDatabaseViewEnd;
135
- else
136
- copy->pin = YapDatabaseViewBeginning;
137
-
138
- return copy;
139
- }
140
-
141
- @end