motion-yapper 0.0.3 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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,149 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
-
3
- #import "YapDatabaseExtension.h"
4
- #import "YapDatabaseSecondaryIndexSetup.h"
5
- #import "YapDatabaseSecondaryIndexConnection.h"
6
- #import "YapDatabaseSecondaryIndexTransaction.h"
7
-
8
- /**
9
- * Welcome to YapDatabase!
10
- *
11
- * https://github.com/yaptv/YapDatabase
12
- *
13
- * The project wiki has a wealth of documentation if you have any questions.
14
- * https://github.com/yaptv/YapDatabase/wiki
15
- *
16
- * YapDatabaseSecondaryIndex is an extension which allows you to add additional indexes.
17
- * That is, it allows you to create index(es) within sqlite for particular properties of your objects.
18
- * You can then issue queries to find or enumerate objects using the indexes. (e.g. age >= 62)
19
- * This allows for increased flexibility above the traditional key-value model.
20
- **/
21
-
22
- /**
23
- * The block handles extracting the column values for the secondary indexes.
24
- *
25
- * When you add or update rows in the databse the block is invoked.
26
- * Your block can inspect the row and determine if it contains any values that should be added to the secondary indexes.
27
- * If not, the block can simply return.
28
- * Otherwise the block should extract any values and add them to the given dictionary.
29
- *
30
- * After the block returns, the dictionary parameter will be inspected,
31
- * and any set values will be automatically inserted/updated within the sqlite indexes.
32
- *
33
- * You should choose a block type that takes the minimum number of required parameters.
34
- * The extension can make various optimizations based on required parameters of the block.
35
- * For example, if metadata isn't required, then the extension can ignore metadata-only updates.
36
- **/
37
- typedef id YapDatabaseSecondaryIndexBlock; // One of the YapDatabaseSecondaryIndexWith_X_Block types below.
38
-
39
- typedef void (^YapDatabaseSecondaryIndexWithKeyBlock) \
40
- (NSMutableDictionary *dict, NSString *collection, NSString *key);
41
- typedef void (^YapDatabaseSecondaryIndexWithObjectBlock) \
42
- (NSMutableDictionary *dict, NSString *collection, NSString *key, id object);
43
- typedef void (^YapDatabaseSecondaryIndexWithMetadataBlock) \
44
- (NSMutableDictionary *dict, NSString *collection, NSString *key, id metadata);
45
- typedef void (^YapDatabaseSecondaryIndexWithRowBlock) \
46
- (NSMutableDictionary *dict, NSString *collection, NSString *key, id object, id metadata);
47
-
48
- /**
49
- * Use this enum to specify what kind of block you're passing.
50
- **/
51
- typedef enum {
52
- YapDatabaseSecondaryIndexBlockTypeWithKey = 1031,
53
- YapDatabaseSecondaryIndexBlockTypeWithObject = 1032,
54
- YapDatabaseSecondaryIndexBlockTypeWithMetadata = 1033,
55
- YapDatabaseSecondaryIndexBlockTypeWithRow = 1034
56
- } YapDatabaseSecondaryIndexBlockType;
57
-
58
-
59
- @interface YapDatabaseSecondaryIndex : YapDatabaseExtension
60
-
61
- /* Inherited from YapDatabaseExtension
62
-
63
- @property (nonatomic, strong, readonly) NSString *registeredName;
64
-
65
- */
66
-
67
- /**
68
- * Creates a new secondary index extension.
69
- * After creation, you'll need to register the extension with the database system.
70
- *
71
- * @param setup
72
- *
73
- * A YapDatabaseSecondaryIndexSetup instance allows you to specify the column names and type.
74
- * The column names can be whatever you want, with a few exceptions for reserved names such as "rowid".
75
- * The types can reflect numbers or text.
76
- *
77
- * @param block
78
- *
79
- * Pass a block that is one of the following types:
80
- * - YapDatabaseSecondaryIndexWithKeyBlock
81
- * - YapDatabaseSecondaryIndexWithObjectBlock
82
- * - YapDatabaseSecondaryIndexWithMetadataBlock
83
- * - YapDatabaseSecondaryIndexWithRowBlock
84
- *
85
- * @param blockType
86
- *
87
- * Pass the blockType enum that matches the passed block:
88
- * - YapDatabaseSecondaryIndexBlockTypeWithKey
89
- * - YapDatabaseSecondaryIndexBlockTypeWithObject
90
- * - YapDatabaseSecondaryIndexBlockTypeWithMetadata
91
- * - YapDatabaseSecondaryIndexBlockTypeWithRow
92
- *
93
- * @see YapDatabaseSecondaryIndexSetup
94
- * @see YapDatabase registerExtension:withName:
95
- **/
96
- - (id)initWithSetup:(YapDatabaseSecondaryIndexSetup *)setup
97
- block:(YapDatabaseSecondaryIndexBlock)block
98
- blockType:(YapDatabaseSecondaryIndexBlockType)blockType;
99
-
100
- /**
101
- * Creates a new secondary index extension.
102
- * After creation, you'll need to register the extension with the database system.
103
- *
104
- * @param setup
105
- *
106
- * A YapDatabaseSecondaryIndexSetup instance allows you to specify the column names and type.
107
- * The column names can be whatever you want, with a few exceptions for reserved names such as "rowid".
108
- * The types can reflect numbers or text.
109
- *
110
- * @param block
111
- *
112
- * Pass a block that is one of the following types:
113
- * - YapDatabaseSecondaryIndexWithKeyBlock
114
- * - YapDatabaseSecondaryIndexWithObjectBlock
115
- * - YapDatabaseSecondaryIndexWithMetadataBlock
116
- * - YapDatabaseSecondaryIndexWithRowBlock
117
- *
118
- * @param blockType
119
- *
120
- * Pass the blockType enum that matches the passed block:
121
- * - YapDatabaseSecondaryIndexBlockTypeWithKey
122
- * - YapDatabaseSecondaryIndexBlockTypeWithObject
123
- * - YapDatabaseSecondaryIndexBlockTypeWithMetadata
124
- * - YapDatabaseSecondaryIndexBlockTypeWithRow
125
- *
126
- * @param version
127
- *
128
- * If, after creating the secondary index(es), you need to change the setup or block,
129
- * then simply increment the version parameter. If you pass a version that is different from the last
130
- * initialization of the extension, then it will automatically re-create itself.
131
- *
132
- * @see YapDatabaseSecondaryIndexSetup
133
- * @see YapDatabase registerExtension:withName:
134
- **/
135
- - (id)initWithSetup:(YapDatabaseSecondaryIndexSetup *)setup
136
- block:(YapDatabaseSecondaryIndexBlock)block
137
- blockType:(YapDatabaseSecondaryIndexBlockType)blockType
138
- version:(int)version;
139
-
140
- /**
141
- * The version assists in making changes to the extension.
142
- *
143
- * If you need to change the columnNames and/or block,
144
- * then simply pass an incremented version during the init method,
145
- * and the FTS extension will automatically update itself.
146
- **/
147
- @property (nonatomic, assign, readonly) int version;
148
-
149
- @end
@@ -1,33 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
- #import "YapDatabaseExtensionConnection.h"
3
-
4
- @class YapDatabaseSecondaryIndex;
5
-
6
-
7
- @interface YapDatabaseSecondaryIndexConnection : YapDatabaseExtensionConnection
8
-
9
- /**
10
- * Returns the parent instance.
11
- **/
12
- @property (nonatomic, strong, readonly) YapDatabaseSecondaryIndex *secondaryIndex;
13
-
14
- /**
15
- * The queryCache speeds up the transaction methods. (enumerateXMatchingQuery:usingBlock:)
16
- *
17
- * In order for a query to be executed, it first has to be compiled by SQLite into an executable routine.
18
- * The queryCache stores these compiled reusable routines, so that repeated queries can be executed faster.
19
- *
20
- * Please note that, in terms of caching, only the queryString matters. The queryParameters do not.
21
- * That is, if you use the same queryString over and over, but with different parameters,
22
- * you will get a nice benefit from caching as it will be able to recyle the compiled routine,
23
- * and simply bind the different parameters each time.
24
- *
25
- * By default the queryCache is enabled and has a limit of 10.
26
- *
27
- * To disable the cache entirely, set queryCacheEnabled to NO.
28
- * To use an inifinite cache size, set the queryCacheLimit to ZERO.
29
- **/
30
- @property (atomic, assign, readwrite) BOOL queryCacheEnabled;
31
- @property (atomic, assign, readwrite) NSUInteger queryCacheLimit;
32
-
33
- @end
@@ -1,33 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
-
3
- @class YapDatabaseSecondaryIndexColumn;
4
-
5
- typedef enum {
6
- YapDatabaseSecondaryIndexTypeInteger,
7
- YapDatabaseSecondaryIndexTypeReal,
8
- YapDatabaseSecondaryIndexTypeText
9
- } YapDatabaseSecondaryIndexType;
10
-
11
-
12
- @interface YapDatabaseSecondaryIndexSetup : NSObject <NSCopying, NSFastEnumeration>
13
-
14
- - (id)init;
15
- - (id)initWithCapacity:(NSUInteger)capacity;
16
-
17
- - (void)addColumn:(NSString *)name withType:(YapDatabaseSecondaryIndexType)type;
18
-
19
- - (NSUInteger)count;
20
- - (YapDatabaseSecondaryIndexColumn *)columnAtIndex:(NSUInteger)index;
21
-
22
- - (NSArray *)columnNames;
23
-
24
- @end
25
-
26
- #pragma mark -
27
-
28
- @interface YapDatabaseSecondaryIndexColumn : NSObject
29
-
30
- @property (nonatomic, copy, readonly) NSString *name;
31
- @property (nonatomic, assign, readonly) YapDatabaseSecondaryIndexType type;
32
-
33
- @end
@@ -1,58 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
-
3
- #import "YapDatabaseExtensionTransaction.h"
4
- #import "YapDatabaseQuery.h"
5
-
6
-
7
- @interface YapDatabaseSecondaryIndexTransaction : YapDatabaseExtensionTransaction
8
-
9
- /**
10
- * These methods allow you to enumerates matches from the secondary index(es) using a given query.
11
- *
12
- * The query that you input is an SQL style query (appropriate for SQLite semantics),
13
- * excluding the "SELECT ... FROM 'tableName'" component.
14
- *
15
- * For example:
16
- *
17
- * query = [YapDatabaseQuery queryWithFormat:@"WHERE age >= 62"];
18
- * [[transaction ext:@"idx"] enumerateKeysMatchingQuery:query usingBlock:^(NSString *key, BOOL *stop) {
19
- *
20
- * // ...
21
- * }];
22
- *
23
- * You can also pass parameters to the query using the standard SQLite placeholder:
24
- *
25
- * query = [YapDatabaseQuery queryWithFormat:@"WHERE age >= ? AND state == ?", @(age), state];
26
- * [[transaction ext:@"idx"] enumerateKeysMatchingQuery:query usingBlock:^(NSString *key, BOOL *stop) {
27
- *
28
- * // ...
29
- * }];
30
- *
31
- * For more information, and more examples, please see YapDatabaseQuery.
32
- *
33
- * @return NO if there was a problem with the given query. YES otherwise.
34
- *
35
- * @see YapDatabaseQuery
36
- **/
37
-
38
- - (BOOL)enumerateKeysMatchingQuery:(YapDatabaseQuery *)query
39
- usingBlock:(void (^)(NSString *collection, NSString *key, BOOL *stop))block;
40
-
41
- - (BOOL)enumerateKeysAndMetadataMatchingQuery:(YapDatabaseQuery *)query
42
- usingBlock:
43
- (void (^)(NSString *collection, NSString *key, id metadata, BOOL *stop))block;
44
-
45
- - (BOOL)enumerateKeysAndObjectsMatchingQuery:(YapDatabaseQuery *)query
46
- usingBlock:
47
- (void (^)(NSString *collection, NSString *key, id object, BOOL *stop))block;
48
-
49
- - (BOOL)enumerateRowsMatchingQuery:(YapDatabaseQuery *)query
50
- usingBlock:
51
- (void (^)(NSString *collection, NSString *key, id object, id metadata, BOOL *stop))block;
52
- /**
53
- * Skips the enumeration process, and just gives you the count of matching rows.
54
- **/
55
-
56
- - (BOOL)getNumberOfRows:(NSUInteger *)count matchingQuery:(YapDatabaseQuery *)query;
57
-
58
- @end
@@ -1,651 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
-
3
- @class YapDatabaseConnection;
4
-
5
- /**
6
- * Welcome to YapDatabase!
7
- *
8
- * The project page has a wealth of documentation if you have any questions.
9
- * https://github.com/yaptv/YapDatabase
10
- *
11
- * If you're new to the project you may want to visit the wiki.
12
- * https://github.com/yaptv/YapDatabase/wiki
13
- *
14
- * Transactions represent atomic access to a database.
15
- * There are two types of transactions:
16
- * - Read-Only transactions
17
- * - Read-Write transactions
18
- *
19
- * Once a transaction is started, all data access within the transaction from that point forward until completion
20
- * represents an atomic "snapshot" of the current state of the database. For example, if a read-write operation
21
- * occurs in parallel with a read-only transaction, the read-only transaction won't see the changes made by
22
- * the read-write operation. But once the read-write operation completes, all transactions started from that point
23
- * forward will see the changes.
24
- *
25
- * You first create and configure a YapDatabase instance.
26
- * Then you can spawn one or more connections to the database file.
27
- * Each connection allows you to execute transactions in a serial fashion.
28
- * For concurrent access, you can create multiple connections,
29
- * and execute transactions on each connection simulataneously.
30
- *
31
- * Concurrency is straight-forward. Here are the rules:
32
- *
33
- * - You can have multiple connections.
34
- * - Every connection is thread-safe.
35
- * - You can have multiple read-only transactions simultaneously without blocking.
36
- * (Each simultaneous transaction would be going through a separate connection.)
37
- * - You can have multiple read-only transactions and a single read-write transaction simultaneously without blocking.
38
- * (Each simultaneous transaction would be going through a separate connection.)
39
- * - There can only be a single transaction per connection at a time.
40
- * (Transactions go through a per-connection serial queue.)
41
- * - There can only be a single read-write transaction at a time.
42
- * (Read-write transactions go through a per-database serial queue.)
43
- **/
44
-
45
- /**
46
- * A YapDatabaseReadTransaction encompasses a single read-only database transaction.
47
- * You can execute multiple operations within a single transaction.
48
- *
49
- * A transaction allows you to safely access the database as needed in a thread-safe and optimized manner.
50
- **/
51
- @interface YapDatabaseReadTransaction : NSObject
52
-
53
- /**
54
- * Transactions are light-weight objects created by connections.
55
- *
56
- * Connections are the parent objects of transactions.
57
- * Connections own the transaction objects.
58
- *
59
- * Transactions store nearly all their state in the parent connection object.
60
- * This reduces the memory requirements for transactions objects,
61
- * and reduces the overhead associated in creating them.
62
- **/
63
- @property (nonatomic, unsafe_unretained, readonly) YapDatabaseConnection *connection;
64
-
65
- #pragma mark Count
66
-
67
- /**
68
- * Returns the total number of collections.
69
- * Each collection may have 1 or more key/object pairs.
70
- **/
71
- - (NSUInteger)numberOfCollections;
72
-
73
- /**
74
- * Returns the total number of keys in the given collection.
75
- * Returns zero if the collection doesn't exist (or all key/object pairs from the collection have been removed).
76
- **/
77
- - (NSUInteger)numberOfKeysInCollection:(NSString *)collection;
78
-
79
- /**
80
- * Returns the total number of key/object pairs in the entire database (including all collections).
81
- **/
82
- - (NSUInteger)numberOfKeysInAllCollections;
83
-
84
- #pragma mark List
85
-
86
- /**
87
- * Returns a list of all collection names.
88
- **/
89
- - (NSArray *)allCollections;
90
-
91
- /**
92
- * Returns a list of all keys in the given collection.
93
- **/
94
- - (NSArray *)allKeysInCollection:(NSString *)collection;
95
-
96
- #pragma mark Primitive
97
-
98
- /**
99
- * Primitive access.
100
- *
101
- * These are available for in-case you store irregular data
102
- * that shouldn't go through configured serializer/deserializer.
103
- *
104
- * @see objectForKey:inCollection:
105
- * @see metadataForKey:inCollection:
106
- **/
107
- - (NSData *)primitiveDataForKey:(NSString *)key inCollection:(NSString *)collection;
108
- - (NSData *)primitiveMetadataForKey:(NSString *)key inCollection:(NSString *)collection;
109
- - (BOOL)getPrimitiveData:(NSData **)dataPtr
110
- primitiveMetadata:(NSData **)primitiveMetadataPtr
111
- forKey:(NSString *)key
112
- inCollection:(NSString *)collection;
113
-
114
- #pragma mark Object & Metadata
115
-
116
- /**
117
- * Object access.
118
- * Objects are automatically deserialized using database's configured deserializer.
119
- **/
120
- - (id)objectForKey:(NSString *)key inCollection:(NSString *)collection;
121
-
122
- /**
123
- * Returns whether or not the given key/collection exists in the database.
124
- **/
125
- - (BOOL)hasObjectForKey:(NSString *)key inCollection:(NSString *)collection;
126
-
127
- /**
128
- * Provides access to both object and metadata in a single call.
129
- *
130
- * @return YES if the key exists in the database. NO otherwise, in which case both object and metadata will be nil.
131
- **/
132
- - (BOOL)getObject:(id *)objectPtr metadata:(id *)metadataPtr forKey:(NSString *)key inCollection:(NSString *)collection;
133
-
134
- /**
135
- * Provides access to the metadata.
136
- * This fetches directly from the metadata dictionary stored in memory, and thus never hits the disk.
137
- **/
138
- - (id)metadataForKey:(NSString *)key inCollection:(NSString *)collection;
139
-
140
- #pragma mark Enumerate
141
-
142
- /**
143
- * Fast enumeration over all the collections in the database.
144
- *
145
- * This uses a "SELECT collection FROM database" operation,
146
- * and then steps over the results invoking the given block handler.
147
- **/
148
- - (void)enumerateCollectionsUsingBlock:(void (^)(NSString *collection, BOOL *stop))block;
149
-
150
- /**
151
- * This method is rarely needed, but may be helpful in certain situations.
152
- *
153
- * This method may be used if you have the key, but not the collection for a particular item.
154
- * Please note that this is not the ideal situation.
155
- *
156
- * Since there may be numerous collections for a given key, this method enumerates all possible collections.
157
- **/
158
- - (void)enumerateCollectionsForKey:(NSString *)key usingBlock:(void (^)(NSString *collection, BOOL *stop))block;
159
-
160
- /**
161
- * Fast enumeration over all keys in the given collection.
162
- *
163
- * This uses a "SELECT key FROM database WHERE collection = ?" operation,
164
- * and then steps over the results invoking the given block handler.
165
- **/
166
- - (void)enumerateKeysInCollection:(NSString *)collection
167
- usingBlock:(void (^)(NSString *key, BOOL *stop))block;
168
-
169
- /**
170
- * Fast enumeration over all keys in the given collection.
171
- *
172
- * This uses a "SELECT collection, key FROM database" operation,
173
- * and then steps over the results invoking the given block handler.
174
- **/
175
- - (void)enumerateKeysInAllCollectionsUsingBlock:(void (^)(NSString *collection, NSString *key, BOOL *stop))block;
176
-
177
- /**
178
- * Fast enumeration over all keys and associated metadata in the given collection.
179
- *
180
- * This uses a "SELECT key, metadata FROM database WHERE collection = ?" operation and steps over the results.
181
- *
182
- * If you only need to enumerate over certain items (e.g. keys with a particular prefix),
183
- * consider using the alternative version below which provides a filter,
184
- * allowing you to skip the deserialization step for those items you're not interested in.
185
- *
186
- * Keep in mind that you cannot modify the collection mid-enumeration (just like any other kind of enumeration).
187
- **/
188
- - (void)enumerateKeysAndMetadataInCollection:(NSString *)collection
189
- usingBlock:(void (^)(NSString *key, id metadata, BOOL *stop))block;
190
-
191
- /**
192
- * Fast enumeration over all keys and associated metadata in the given collection.
193
- *
194
- * From the filter block, simply return YES if you'd like the block handler to be invoked for the given key.
195
- * If the filter block returns NO, then the block handler is skipped for the given key,
196
- * which avoids the cost associated with deserializing the object.
197
- *
198
- * Keep in mind that you cannot modify the collection mid-enumeration (just like any other kind of enumeration).
199
- **/
200
- - (void)enumerateKeysAndMetadataInCollection:(NSString *)collection
201
- usingBlock:(void (^)(NSString *key, id metadata, BOOL *stop))block
202
- withFilter:(BOOL (^)(NSString *key))filter;
203
-
204
-
205
-
206
- /**
207
- * Fast enumeration over all key/metadata pairs in all collections.
208
- *
209
- * This uses a "SELECT metadata FROM database ORDER BY collection ASC" operation, and steps over the results.
210
- *
211
- * If you only need to enumerate over certain objects (e.g. keys with a particular prefix),
212
- * consider using the alternative version below which provides a filter,
213
- * allowing you to skip the deserialization step for those objects you're not interested in.
214
- *
215
- * Keep in mind that you cannot modify the database mid-enumeration (just like any other kind of enumeration).
216
- **/
217
- - (void)enumerateKeysAndMetadataInAllCollectionsUsingBlock:
218
- (void (^)(NSString *collection, NSString *key, id metadata, BOOL *stop))block;
219
-
220
- /**
221
- * Fast enumeration over all key/metadata pairs in all collections.
222
- *
223
- * This uses a "SELECT metadata FROM database ORDER BY collection ASC" operation and steps over the results.
224
- *
225
- * From the filter block, simply return YES if you'd like the block handler to be invoked for the given key.
226
- * If the filter block returns NO, then the block handler is skipped for the given key,
227
- * which avoids the cost associated with deserializing the object.
228
- *
229
- * Keep in mind that you cannot modify the database mid-enumeration (just like any other kind of enumeration).
230
- **/
231
- - (void)enumerateKeysAndMetadataInAllCollectionsUsingBlock:
232
- (void (^)(NSString *collection, NSString *key, id metadata, BOOL *stop))block
233
- withFilter:(BOOL (^)(NSString *collection, NSString *key))filter;
234
-
235
- /**
236
- * Fast enumeration over all objects in the database.
237
- *
238
- * This uses a "SELECT key, object from database WHERE collection = ?" operation, and then steps over the results,
239
- * deserializing each object, and then invoking the given block handler.
240
- *
241
- * If you only need to enumerate over certain objects (e.g. keys with a particular prefix),
242
- * consider using the alternative version below which provides a filter,
243
- * allowing you to skip the serialization step for those objects you're not interested in.
244
- **/
245
- - (void)enumerateKeysAndObjectsInCollection:(NSString *)collection
246
- usingBlock:(void (^)(NSString *key, id object, BOOL *stop))block;
247
-
248
- /**
249
- * Fast enumeration over objects in the database for which you're interested in.
250
- * The filter block allows you to decide which objects you're interested in.
251
- *
252
- * From the filter block, simply return YES if you'd like the block handler to be invoked for the given key.
253
- * If the filter block returns NO, then the block handler is skipped for the given key,
254
- * which avoids the cost associated with deserializing the object.
255
- **/
256
- - (void)enumerateKeysAndObjectsInCollection:(NSString *)collection
257
- usingBlock:(void (^)(NSString *key, id object, BOOL *stop))block
258
- withFilter:(BOOL (^)(NSString *key))filter;
259
-
260
- /**
261
- * Enumerates all key/object pairs in all collections.
262
- *
263
- * The enumeration is sorted by collection. That is, it will enumerate fully over a single collection
264
- * before moving onto another collection.
265
- *
266
- * If you only need to enumerate over certain objects (e.g. subset of collections, or keys with a particular prefix),
267
- * consider using the alternative version below which provides a filter,
268
- * allowing you to skip the serialization step for those objects you're not interested in.
269
- **/
270
- - (void)enumerateKeysAndObjectsInAllCollectionsUsingBlock:
271
- (void (^)(NSString *collection, NSString *key, id object, BOOL *stop))block;
272
-
273
- /**
274
- * Enumerates all key/object pairs in all collections.
275
- * The filter block allows you to decide which objects you're interested in.
276
- *
277
- * The enumeration is sorted by collection. That is, it will enumerate fully over a single collection
278
- * before moving onto another collection.
279
- *
280
- * From the filter block, simply return YES if you'd like the block handler to be invoked for the given
281
- * collection/key pair. If the filter block returns NO, then the block handler is skipped for the given pair,
282
- * which avoids the cost associated with deserializing the object.
283
- **/
284
- - (void)enumerateKeysAndObjectsInAllCollectionsUsingBlock:
285
- (void (^)(NSString *collection, NSString *key, id object, BOOL *stop))block
286
- withFilter:(BOOL (^)(NSString *collection, NSString *key))filter;
287
-
288
- /**
289
- * Fast enumeration over all rows in the database.
290
- *
291
- * This uses a "SELECT key, data, metadata from database WHERE collection = ?" operation,
292
- * and then steps over the results, deserializing each object & metadata, and then invoking the given block handler.
293
- *
294
- * If you only need to enumerate over certain rows (e.g. keys with a particular prefix),
295
- * consider using the alternative version below which provides a filter,
296
- * allowing you to skip the serialization step for those rows you're not interested in.
297
- **/
298
- - (void)enumerateRowsInCollection:(NSString *)collection
299
- usingBlock:(void (^)(NSString *key, id object, id metadata, BOOL *stop))block;
300
-
301
- /**
302
- * Fast enumeration over rows in the database for which you're interested in.
303
- * The filter block allows you to decide which rows you're interested in.
304
- *
305
- * From the filter block, simply return YES if you'd like the block handler to be invoked for the given key.
306
- * If the filter block returns NO, then the block handler is skipped for the given key,
307
- * which avoids the cost associated with deserializing the object & metadata.
308
- **/
309
- - (void)enumerateRowsInCollection:(NSString *)collection
310
- usingBlock:(void (^)(NSString *key, id object, id metadata, BOOL *stop))block
311
- withFilter:(BOOL (^)(NSString *key))filter;
312
-
313
- /**
314
- * Enumerates all rows in all collections.
315
- *
316
- * The enumeration is sorted by collection. That is, it will enumerate fully over a single collection
317
- * before moving onto another collection.
318
- *
319
- * If you only need to enumerate over certain rows (e.g. subset of collections, or keys with a particular prefix),
320
- * consider using the alternative version below which provides a filter,
321
- * allowing you to skip the serialization step for those objects you're not interested in.
322
- **/
323
- - (void)enumerateRowsInAllCollectionsUsingBlock:
324
- (void (^)(NSString *collection, NSString *key, id object, id metadata, BOOL *stop))block;
325
-
326
- /**
327
- * Enumerates all rows in all collections.
328
- * The filter block allows you to decide which objects you're interested in.
329
- *
330
- * The enumeration is sorted by collection. That is, it will enumerate fully over a single collection
331
- * before moving onto another collection.
332
- *
333
- * From the filter block, simply return YES if you'd like the block handler to be invoked for the given
334
- * collection/key pair. If the filter block returns NO, then the block handler is skipped for the given pair,
335
- * which avoids the cost associated with deserializing the object.
336
- **/
337
- - (void)enumerateRowsInAllCollectionsUsingBlock:
338
- (void (^)(NSString *collection, NSString *key, id object, id metadata, BOOL *stop))block
339
- withFilter:(BOOL (^)(NSString *collection, NSString *key))filter;
340
-
341
- /**
342
- * Enumerates over the given list of keys (unordered).
343
- *
344
- * This method is faster than fetching individual items as it optimizes cache access.
345
- * That is, it will first enumerate over items in the cache and then fetch items from the database,
346
- * thus optimizing the cache and reducing query size.
347
- *
348
- * If any keys are missing from the database, the 'metadata' parameter will be nil.
349
- *
350
- * IMPORTANT:
351
- * Due to cache optimizations, the items may not be enumerated in the same order as the 'keys' parameter.
352
- **/
353
- - (void)enumerateMetadataForKeys:(NSArray *)keys
354
- inCollection:(NSString *)collection
355
- unorderedUsingBlock:(void (^)(NSUInteger keyIndex, id metadata, BOOL *stop))block;
356
-
357
- /**
358
- * Enumerates over the given list of keys (unordered).
359
- *
360
- * This method is faster than fetching individual items as it optimizes cache access.
361
- * That is, it will first enumerate over items in the cache and then fetch items from the database,
362
- * thus optimizing the cache and reducing query size.
363
- *
364
- * If any keys are missing from the database, the 'object' parameter will be nil.
365
- *
366
- * IMPORTANT:
367
- * Due to cache optimizations, the items may not be enumerated in the same order as the 'keys' parameter.
368
- **/
369
- - (void)enumerateObjectsForKeys:(NSArray *)keys
370
- inCollection:(NSString *)collection
371
- unorderedUsingBlock:(void (^)(NSUInteger keyIndex, id object, BOOL *stop))block;
372
-
373
- /**
374
- * Enumerates over the given list of keys (unordered).
375
- *
376
- * This method is faster than fetching individual items as it optimizes cache access.
377
- * That is, it will first enumerate over items in the cache and then fetch items from the database,
378
- * thus optimizing the cache and reducing query size.
379
- *
380
- * If any keys are missing from the database, the 'object' and 'metadata' parameter will be nil.
381
- *
382
- * IMPORTANT:
383
- * Due to cache optimizations, the items may not be enumerated in the same order as the 'keys' parameter.
384
- **/
385
- - (void)enumerateRowsForKeys:(NSArray *)keys
386
- inCollection:(NSString *)collection
387
- unorderedUsingBlock:(void (^)(NSUInteger keyIndex, id object, id metadata, BOOL *stop))block;
388
-
389
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
390
- #pragma mark Extensions
391
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
392
-
393
- /**
394
- * Returns an extension transaction corresponding to the extension type registered under the given name.
395
- * If the extension has not yet been opened, it is done so automatically.
396
- *
397
- * @return
398
- * A subclass of YapDatabaseExtensionTransaction,
399
- * according to the type of extension registered under the given name.
400
- *
401
- * One must register an extension with the database before it can be accessed from within connections or transactions.
402
- * After registration everything works automatically using just the registered extension name.
403
- *
404
- * @see [YapDatabase registerExtension:withName:]
405
- **/
406
- - (id)extension:(NSString *)extensionName;
407
- - (id)ext:(NSString *)extensionName; // <-- Shorthand (same as extension: method)
408
-
409
- @end
410
-
411
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
412
- #pragma mark -
413
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
414
-
415
- @interface YapDatabaseReadWriteTransaction : YapDatabaseReadTransaction
416
-
417
- /**
418
- * Under normal circumstances, when a read-write transaction block completes,
419
- * the changes are automatically committed. If, however, something goes wrong and
420
- * you'd like to abort and discard all changes made within the transaction,
421
- * then invoke this method.
422
- *
423
- * You should generally return (exit the transaction block) after invoking this method.
424
- * Any changes made within the the transaction before and after invoking this method will be discarded.
425
- **/
426
- - (void)rollback;
427
-
428
- /**
429
- * The YapDatabaseModifiedNotification is posted following a readwrite transaction which made changes.
430
- *
431
- * These notifications are used in a variety of ways:
432
- * - They may be used as a general notification mechanism to detect changes to the database.
433
- * - They may be used by extensions to post change information.
434
- * For example, YapDatabaseView will post the index changes, which can easily be used to animate a tableView.
435
- * - They are integrated into the architecture of long-lived transactions in order to maintain a steady state.
436
- *
437
- * Thus it is recommended you integrate your own notification information into this existing notification,
438
- * as opposed to broadcasting your own separate notification.
439
- **/
440
- - (void)setCustomObjectForYapDatabaseModifiedNotification:(id)object;
441
-
442
- #pragma mark Primitive
443
-
444
- /**
445
- * Primitive access.
446
- * This method is available in case you need to store irregular data that
447
- * shouldn't go through the configured serializer/deserializer.
448
- *
449
- * Primitive data is stored into the database, but doesn't get routed through any of the extensions.
450
- *
451
- * Remember that if you place primitive data into the database via this method,
452
- * you are responsible for accessing it via the appropriate primitive accessor (such as
453
- * primitiveDataForKey:inCollection:). If you attempt to access it via the object accessor
454
- * (objectForKey:inCollection), then the system will attempt to deserialize the primitive data via the
455
- * configured deserializer, which may or may not work depending on the primitive data you're storing.
456
- *
457
- * This method is the primitive version of setObject:forKey:inCollection:.
458
- * For more information see the documentation for setObject:forKey:inCollection:.
459
- *
460
- * @see setObject:forKey:inCollection:
461
- * @see primitiveDataForKey:inCollection:
462
- **/
463
- - (void)setPrimitiveData:(NSData *)primitiveData forKey:(NSString *)key inCollection:(NSString *)collection;
464
-
465
- /**
466
- * Primitive access.
467
- * This method is available in case you need to store irregular data that
468
- * shouldn't go through the configured serializer/deserializer.
469
- *
470
- * Primitive data is stored into the database, but doesn't get routed through any of the extensions.
471
- *
472
- * Remember that if you place primitive data into the database via this method,
473
- * you are responsible for accessing it via the appropriate primitive accessor (such as
474
- * primitiveDataForKey:inCollection:). If you attempt to access it via the object accessor
475
- * (objectForKey:inCollection), then the system will attempt to deserialize the primitive data via the
476
- * configured deserializer, which may or may not work depending on the primitive data you're storing.
477
- *
478
- * This method is the primitive version of setObject:forKey:inCollection:withMetadata:.
479
- * For more information see the documentation for setObject:forKey:inCollection:withMetadata:.
480
- *
481
- * @see setObject:forKey:inCollection:withMetadata:
482
- * @see primitiveDataForKey:inCollection:
483
- * @see primitiveMetadataForKey:inCollection:
484
- **/
485
- - (void)setPrimitiveData:(NSData *)primitiveData
486
- forKey:(NSString *)key
487
- inCollection:(NSString *)collection
488
- withPrimitiveMetadata:(NSData *)primitiveMetadata;
489
-
490
- /**
491
- * Primitive access.
492
- * This method is available in case you need to store irregular data that
493
- * shouldn't go through the configured serializer/deserializer.
494
- *
495
- * Primitive data is stored into the database, but doesn't get routed through any of the extensions.
496
- *
497
- * Remember that if you place primitive data into the database via this method,
498
- * you are responsible for accessing it via the appropriate primitive accessor (such as
499
- * primitiveDataForKey:inCollection:). If you attempt to access it via the object accessor
500
- * (objectForKey:inCollection), then the system will attempt to deserialize the primitive data via the
501
- * configured deserializer, which may or may not work depending on the primitive data you're storing.
502
- *
503
- * This method is the primitive version of replaceObject:forKey:inCollection:.
504
- * For more information see the documentation for replaceObject:forKey:inCollection:.
505
- *
506
- * @see replaceObject:forKey:inCollection:
507
- * @see primitiveDataForKey:inCollection:
508
- **/
509
- - (void)replacePrimitiveData:(NSData *)primitiveData forKey:(NSString *)key inCollection:(NSString *)collection;
510
-
511
- /**
512
- * Primitive access.
513
- * This method is available in case you need to store irregular data that
514
- * shouldn't go through the configured serializer/deserializer.
515
- *
516
- * Primitive data is stored into the database, but doesn't get routed through any of the extensions.
517
- *
518
- * Remember that if you place primitive data into the database via this method,
519
- * you are responsible for accessing it via the appropriate primitive accessor (such as
520
- * primitiveMetadataForKey:inCollection:). If you attempt to access it via the object accessor
521
- * (metadataForKey:inCollection), then the system will attempt to deserialize the primitive data via the
522
- * configured deserializer, which may or may not work depending on the primitive data you're storing.
523
- *
524
- * This method is the primitive version of replaceMetadata:forKey:inCollection:.
525
- * For more information see the documentation for replaceMetadata:forKey:inCollection:.
526
- *
527
- * @see replaceMetadata:forKey:inCollection:
528
- * @see primitiveMetadataForKey:inCollection:
529
- **/
530
- - (void)replacePrimitiveMetadata:(NSData *)primitiveMetadata forKey:(NSString *)key inCollection:(NSString *)collection;
531
-
532
- /**
533
- * DEPRECATED: Use replacePrimitiveMetadata:forKey:inCollection: instead.
534
- **/
535
- - (void)setPrimitiveMetadata:(NSData *)primitiveMetadata forKey:(NSString *)key inCollection:(NSString *)collection
536
- __attribute((deprecated("Use method replacePrimitiveMetadata:forKey:inCollection: instead")));
537
-
538
- #pragma mark Object & Metadata
539
-
540
- /**
541
- * Sets the object for the given key/collection.
542
- * The object is automatically serialized using the database's configured objectSerializer.
543
- *
544
- * If you pass nil for the object, then this method will remove the row from the database (if it exists).
545
- *
546
- * This method implicitly sets the associated metadata to nil.
547
- **/
548
- - (void)setObject:(id)object forKey:(NSString *)key inCollection:(NSString *)collection;
549
-
550
- /**
551
- * Sets the object & metadata for the given key/collection.
552
- *
553
- * The object is automatically serialized using the database's configured objectSerializer.
554
- * The metadata is automatically serialized using the database's configured metadataSerializer.
555
- *
556
- * The metadata is optional. You can pass nil for the metadata is unneeded.
557
- * If non-nil then the metadata is also written to the database (metadata is also persistent).
558
- *
559
- * If you pass nil for the object, then this method will remove the row from the database (if it exists).
560
- **/
561
- - (void)setObject:(id)object forKey:(NSString *)key inCollection:(NSString *)collection withMetadata:(id)metadata;
562
-
563
- /**
564
- * If a row with the given key/collection exists, then replaces the object for that row with the new value.
565
- * It only replaces the object. The metadata for the row doesn't change.
566
- *
567
- * If there is no row in the database for the given key/collection then this method does nothing.
568
- *
569
- * If you pass nil for the object, then this method will remove
570
- **/
571
- - (void)replaceObject:(id)object forKey:(NSString *)key inCollection:(NSString *)collection;
572
-
573
- /**
574
- * If a row with the given key/collection exists, then replaces the metadata for that row with the new value.
575
- * It only replaces the metadata. The object for the row doesn't change.
576
- *
577
- * If there is no row in the database for the given key/collection then this method does nothing.
578
- *
579
- * If you pass nil for the metadata, any metadata previously associated with the key/collection is removed.
580
- **/
581
- - (void)replaceMetadata:(id)metadata forKey:(NSString *)key inCollection:(NSString *)collection;
582
-
583
- /**
584
- * DEPRECATED: Use replaceMetadata:forKey:inCollection: instead.
585
- **/
586
- - (void)setMetadata:(id)metadata forKey:(NSString *)key inCollection:(NSString *)collection
587
- __attribute((deprecated("Use method replaceMetadata:forKey:inCollection: instead")));
588
-
589
- #pragma mark Touch
590
-
591
- /**
592
- * You can touch an object if you want to mark it as updated without actually writing any changes to disk.
593
- *
594
- * For example:
595
- *
596
- * You have a BNBook object in your database.
597
- * One of the properties of the book object is a URL pointing to an image for the front cover of the book.
598
- * This image gets changed on the server. Thus the UI representation of the book needs to be updated
599
- * to reflect the updated image on the server. You realize that all your views are already listening for
600
- * YapDatabaseModified notifications, so if you update the object in the database then all your views are
601
- * already wired to update the UI appropriately. However, the actual object itself didn't change. So while
602
- * there technically isn't any reason to update the object on disk, doing so would be the easiest way to
603
- * keep the UI up-to-date. So what you really want is a way to "mark" the object as updated, without actually
604
- * incurring the overhead of rewriting it to disk.
605
- *
606
- * And this is exactly what the touch methods were designed for.
607
- * It won't actually cause the object to get rewritten to disk.
608
- * However, it will mark the object as "updated" within the YapDatabaseModified notification,
609
- * so any UI components listening for changes will see this object as updated, and can update as appropriate.
610
- *
611
- * The touchObjectForKey:inCollection: method is similar to calling setObject:forKey:inCollection:withMetadata:,
612
- * and passing the object & metadata that already exists for the key. But without the overhead of fetching the items,
613
- * or re-writing the items to disk.
614
- *
615
- * The touchMetadataForKey: method is similar to calling replaceMetadata:forKey:,
616
- * and passing the metadata that already exists for the key. But without the overhead of fetching the metadata,
617
- * or re-writing the metadata to disk.
618
- *
619
- * Note: It is safe to touch objects during enumeration.
620
- * Normally, altering the database while enumerating it will result in an exception (just like altering an array
621
- * while enumerating it). However, it's safe to touch objects during enumeration.
622
- **/
623
- - (void)touchObjectForKey:(NSString *)key inCollection:(NSString *)collection;
624
- - (void)touchMetadataForKey:(NSString *)key inCollection:(NSString *)collection;
625
-
626
- #pragma mark Remove
627
-
628
- /**
629
- * Deletes the database row with the given key/collection.
630
- * This method is automatically called if you invoke
631
- * setObject:forKey:collection: or setPrimitiveData:forKey:collection: and pass nil object/data.
632
- **/
633
- - (void)removeObjectForKey:(NSString *)key inCollection:(NSString *)collection;
634
-
635
- /**
636
- * Deletes the database rows with the given keys in the given collection.
637
- **/
638
- - (void)removeObjectsForKeys:(NSArray *)keys inCollection:(NSString *)collection;
639
-
640
- /**
641
- * Deletes every key/object pair from the given collection.
642
- * No trace of the collection will remain afterwards.
643
- **/
644
- - (void)removeAllObjectsInCollection:(NSString *)collection;
645
-
646
- /**
647
- * Removes every key/object pair in the entire database (from all collections).
648
- **/
649
- - (void)removeAllObjectsInAllCollections;
650
-
651
- @end