motion-yapper 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/.travis.yml +2 -0
  4. data/Gemfile +1 -0
  5. data/README.md +1 -1
  6. data/Rakefile +1 -1
  7. data/lib/motion-yapper.rb +1 -0
  8. data/lib/yapper.rb +3 -5
  9. data/lib/yapper/config.rb +2 -0
  10. data/lib/yapper/db.rb +105 -40
  11. data/lib/yapper/document.rb +7 -4
  12. data/lib/yapper/document/callbacks.rb +0 -7
  13. data/lib/yapper/document/{persistance.rb → persistence.rb} +27 -21
  14. data/lib/yapper/document/relation.rb +29 -22
  15. data/lib/yapper/document/selection.rb +122 -54
  16. data/lib/yapper/extensions.rb +12 -24
  17. data/lib/yapper/settings.rb +43 -0
  18. data/lib/yapper/timestamps.rb +2 -0
  19. data/lib/yapper/version.rb +1 -1
  20. data/{yapper.gemspec → motion-yapper.gemspec} +0 -0
  21. data/spec/integration/{where_spec.rb → criteria_spec.rb} +78 -10
  22. data/spec/integration/db_spec.rb +70 -0
  23. data/spec/integration/defaults_spec.rb +37 -0
  24. data/spec/integration/extensions_spec.rb +14 -0
  25. data/spec/integration/{persistance_spec.rb → persistence_spec.rb} +0 -0
  26. data/spec/integration/relation_spec.rb +4 -4
  27. data/vendor/Podfile.lock +9 -11
  28. data/vendor/Pods/.build/libPods-CocoaLumberjack.a +0 -0
  29. data/vendor/Pods/.build/libPods-NSData+MD5Digest.a +0 -0
  30. data/vendor/Pods/.build/libPods-YapDatabase.a +0 -0
  31. data/vendor/Pods/.build/libPods.a +0 -0
  32. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDASLLogger.h +4 -4
  33. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDAbstractDatabaseLogger.h +14 -14
  34. data/vendor/Pods/{CocoaLumberjack/Lumberjack/Extensions/ContextFilterLogFormatter.h → BuildHeaders/CocoaLumberjack/DDContextFilterLogFormatter.h} +6 -8
  35. data/vendor/Pods/BuildHeaders/CocoaLumberjack/{DispatchQueueLogFormatter.h → DDDispatchQueueLogFormatter.h} +18 -6
  36. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDFileLogger.h +67 -32
  37. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog+LOGV.h +99 -0
  38. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog.h +98 -65
  39. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDMultiFormatter.h +30 -0
  40. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDTTYLogger.h +39 -25
  41. data/vendor/Pods/BuildHeaders/YapDatabase/NSDictionary+YapDatabase.h +8 -0
  42. data/vendor/Pods/BuildHeaders/YapDatabase/YapCache.h +1 -0
  43. data/vendor/Pods/BuildHeaders/YapDatabase/YapCollectionKey.h +3 -0
  44. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabase.h +4 -4
  45. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnection.h +21 -19
  46. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseDefaults.h +1 -1
  47. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionPrivate.h +35 -31
  48. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredView.h +8 -35
  49. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewPrivate.h +0 -2
  50. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTransaction.h +17 -17
  51. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTypes.h +32 -0
  52. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchPrivate.h +8 -0
  53. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabasePrivate.h +43 -21
  54. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationship.h +35 -0
  55. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipConnection.h +29 -0
  56. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdge.h +163 -0
  57. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdgePrivate.h +79 -0
  58. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipNode.h +99 -0
  59. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipOptions.h +59 -0
  60. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipPrivate.h +125 -0
  61. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipTransaction.h +384 -0
  62. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndex.h +49 -0
  63. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexPrivate.h +10 -0
  64. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetupPrivate.h +18 -0
  65. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseTransaction.h +131 -21
  66. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseView.h +48 -107
  67. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChange.h +2 -2
  68. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewConnection.h +1 -0
  69. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappings.h +17 -0
  70. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewOptions.h +10 -3
  71. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPrivate.h +18 -1
  72. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTransaction.h +75 -24
  73. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTypes.h +99 -0
  74. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.h +4 -4
  75. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.m +51 -50
  76. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.h +14 -14
  77. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.m +546 -546
  78. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.h +67 -32
  79. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.m +1093 -907
  80. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog+LOGV.h +99 -0
  81. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.h +98 -65
  82. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.m +873 -748
  83. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.h +39 -25
  84. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.m +1284 -1243
  85. data/vendor/Pods/{BuildHeaders/CocoaLumberjack/ContextFilterLogFormatter.h → CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.h} +6 -8
  86. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/{ContextFilterLogFormatter.m → DDContextFilterLogFormatter.m} +70 -70
  87. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/{DispatchQueueLogFormatter.h → DDDispatchQueueLogFormatter.h} +18 -6
  88. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.m +253 -0
  89. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.h +30 -0
  90. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.m +127 -0
  91. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/README.txt +1 -1
  92. data/vendor/Pods/CocoaLumberjack/README.markdown +52 -15
  93. data/vendor/Pods/Headers/CocoaLumberjack/DDASLLogger.h +4 -4
  94. data/vendor/Pods/Headers/CocoaLumberjack/DDAbstractDatabaseLogger.h +14 -14
  95. data/vendor/Pods/Headers/CocoaLumberjack/{ContextFilterLogFormatter.h → DDContextFilterLogFormatter.h} +6 -8
  96. data/vendor/Pods/Headers/CocoaLumberjack/{DispatchQueueLogFormatter.h → DDDispatchQueueLogFormatter.h} +18 -6
  97. data/vendor/Pods/Headers/CocoaLumberjack/DDFileLogger.h +67 -32
  98. data/vendor/Pods/Headers/CocoaLumberjack/DDLog+LOGV.h +99 -0
  99. data/vendor/Pods/Headers/CocoaLumberjack/DDLog.h +98 -65
  100. data/vendor/Pods/Headers/CocoaLumberjack/DDMultiFormatter.h +30 -0
  101. data/vendor/Pods/Headers/CocoaLumberjack/DDTTYLogger.h +39 -25
  102. data/vendor/Pods/Headers/YapDatabase/YapCollectionKey.h +3 -0
  103. data/vendor/Pods/Headers/YapDatabase/YapDatabase.h +4 -4
  104. data/vendor/Pods/Headers/YapDatabase/YapDatabaseConnection.h +21 -19
  105. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredView.h +8 -35
  106. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTransaction.h +17 -17
  107. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTypes.h +32 -0
  108. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationship.h +35 -0
  109. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipConnection.h +29 -0
  110. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipEdge.h +163 -0
  111. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipNode.h +99 -0
  112. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipOptions.h +59 -0
  113. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipTransaction.h +384 -0
  114. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndex.h +49 -0
  115. data/vendor/Pods/Headers/YapDatabase/YapDatabaseTransaction.h +131 -21
  116. data/vendor/Pods/Headers/YapDatabase/YapDatabaseView.h +48 -107
  117. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewChange.h +2 -2
  118. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewConnection.h +1 -0
  119. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewMappings.h +17 -0
  120. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewOptions.h +10 -3
  121. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTransaction.h +75 -24
  122. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTypes.h +99 -0
  123. data/vendor/Pods/Headers/____Pods-CocoaLumberjack-prefix.h +2 -0
  124. data/vendor/Pods/Headers/____Pods-environment.h +15 -15
  125. data/vendor/Pods/Manifest.lock +9 -11
  126. data/vendor/Pods/Pods-CocoaLumberjack-Private.xcconfig +1 -1
  127. data/vendor/Pods/Pods-CocoaLumberjack-prefix.pch +2 -0
  128. data/vendor/Pods/Pods-NSData+MD5Digest-Private.xcconfig +1 -1
  129. data/vendor/Pods/Pods-YapDatabase-Private.xcconfig +1 -1
  130. data/vendor/Pods/{Pods-Acknowledgements.markdown → Pods-acknowledgements.markdown} +0 -37
  131. data/vendor/Pods/{Pods-Acknowledgements.plist → Pods-acknowledgements.plist} +0 -45
  132. data/vendor/Pods/Pods-environment.h +15 -15
  133. data/vendor/Pods/Pods.xcconfig +3 -3
  134. data/vendor/Pods/Pods.xcodeproj/project.pbxproj +2426 -3155
  135. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-CocoaLumberjack.xcscheme +59 -0
  136. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-NSData+MD5Digest.xcscheme +59 -0
  137. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-YapDatabase.xcscheme +59 -0
  138. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods.xcscheme +59 -0
  139. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/xcschememanagement.plist +31 -0
  140. data/vendor/Pods/YapDatabase/README.md +3 -1
  141. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/Internal/YapDatabaseFilteredViewPrivate.h +0 -2
  142. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.h +8 -35
  143. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.m +25 -41
  144. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.h +17 -17
  145. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.m +403 -134
  146. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTypes.h +32 -0
  147. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/Internal/YapDatabaseFullTextSearchPrivate.h +8 -0
  148. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.m +8 -8
  149. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.m +113 -62
  150. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/Internal/YapDatabaseExtensionPrivate.h +35 -31
  151. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.m +25 -0
  152. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.m +1 -1
  153. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.m +25 -1
  154. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipEdgePrivate.h +79 -0
  155. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipPrivate.h +125 -0
  156. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.h +35 -0
  157. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.m +129 -0
  158. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.h +29 -0
  159. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.m +802 -0
  160. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.h +163 -0
  161. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.m +408 -0
  162. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipNode.h +99 -0
  163. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.h +59 -0
  164. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.m +29 -0
  165. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.h +384 -0
  166. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.m +5254 -0
  167. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexPrivate.h +10 -0
  168. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexSetupPrivate.h +18 -0
  169. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.h +49 -0
  170. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.m +12 -0
  171. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.m +9 -8
  172. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.m +62 -1
  173. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.m +148 -45
  174. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPrivate.h +18 -1
  175. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.h +2 -2
  176. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.m +15 -9
  177. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.h +17 -0
  178. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.m +211 -64
  179. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.h +48 -107
  180. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.m +10 -7
  181. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.h +1 -0
  182. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.m +13 -22
  183. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.h +10 -3
  184. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.h +75 -24
  185. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.m +725 -244
  186. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTypes.h +99 -0
  187. data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.h +8 -0
  188. data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.m +19 -0
  189. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.h +1 -0
  190. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.m +12 -0
  191. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.h +1 -1
  192. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.m +3 -3
  193. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabasePrivate.h +43 -21
  194. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.m +4 -0
  195. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.h +3 -0
  196. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.m +5 -0
  197. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.h +4 -4
  198. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.m +84 -93
  199. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.h +21 -19
  200. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.m +381 -209
  201. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.h +131 -21
  202. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.m +587 -267
  203. data/vendor/Pods/{Pods.bridgesupport → build-iPhoneSimulator/Pods.bridgesupport} +633 -2557
  204. data/vendor/Pods/build-iPhoneSimulator/libPods.a +0 -0
  205. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.bridgesupport +2 -1
  206. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.h +2 -1
  207. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.m +4 -2
  208. metadata +80 -108
  209. data/Gemfile.lock +0 -63
  210. data/lib/yapper/attachment.rb +0 -48
  211. data/lib/yapper/document/attachment.rb +0 -26
  212. data/lib/yapper/sync.rb +0 -134
  213. data/lib/yapper/sync/data.rb +0 -12
  214. data/lib/yapper/sync/event.rb +0 -194
  215. data/lib/yapper/sync/queue.rb +0 -164
  216. data/spec/integration/all_spec.rb +0 -40
  217. data/spec/integration/sync_spec.rb +0 -42
  218. data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.h +0 -641
  219. data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.m +0 -1396
  220. data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h +0 -133
  221. data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m +0 -327
  222. data/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h +0 -113
  223. data/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m +0 -321
  224. data/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h +0 -71
  225. data/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m +0 -150
  226. data/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
  227. data/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m +0 -157
  228. data/vendor/Pods/AFNetworking/AFNetworking/AFNetworking.h +0 -43
  229. data/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h +0 -68
  230. data/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m +0 -143
  231. data/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h +0 -370
  232. data/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m +0 -848
  233. data/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h +0 -89
  234. data/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m +0 -167
  235. data/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h +0 -78
  236. data/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m +0 -191
  237. data/vendor/Pods/AFNetworking/LICENSE +0 -19
  238. data/vendor/Pods/AFNetworking/README.md +0 -208
  239. data/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h +0 -641
  240. data/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h +0 -133
  241. data/vendor/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h +0 -113
  242. data/vendor/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h +0 -71
  243. data/vendor/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
  244. data/vendor/Pods/BuildHeaders/AFNetworking/AFNetworking.h +0 -43
  245. data/vendor/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h +0 -68
  246. data/vendor/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h +0 -370
  247. data/vendor/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h +0 -89
  248. data/vendor/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h +0 -78
  249. data/vendor/Pods/BuildHeaders/Reachability/Reachability.h +0 -109
  250. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DispatchQueueLogFormatter.m +0 -251
  251. data/vendor/Pods/Headers/AFNetworking/AFHTTPClient.h +0 -641
  252. data/vendor/Pods/Headers/AFNetworking/AFHTTPRequestOperation.h +0 -133
  253. data/vendor/Pods/Headers/AFNetworking/AFImageRequestOperation.h +0 -113
  254. data/vendor/Pods/Headers/AFNetworking/AFJSONRequestOperation.h +0 -71
  255. data/vendor/Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
  256. data/vendor/Pods/Headers/AFNetworking/AFNetworking.h +0 -43
  257. data/vendor/Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h +0 -68
  258. data/vendor/Pods/Headers/AFNetworking/AFURLConnectionOperation.h +0 -370
  259. data/vendor/Pods/Headers/AFNetworking/AFXMLRequestOperation.h +0 -89
  260. data/vendor/Pods/Headers/AFNetworking/UIImageView+AFNetworking.h +0 -78
  261. data/vendor/Pods/Headers/Reachability/Reachability.h +0 -109
  262. data/vendor/Pods/Headers/YapDatabase/YapCache.h +0 -90
  263. data/vendor/Pods/Headers/YapDatabase/YapDatabaseConnectionState.h +0 -29
  264. data/vendor/Pods/Headers/YapDatabase/YapDatabaseDefaults.h +0 -37
  265. data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionPrivate.h +0 -440
  266. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewPrivate.h +0 -19
  267. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchPrivate.h +0 -69
  268. data/vendor/Pods/Headers/YapDatabase/YapDatabaseLogging.h +0 -158
  269. data/vendor/Pods/Headers/YapDatabase/YapDatabaseManager.h +0 -17
  270. data/vendor/Pods/Headers/YapDatabase/YapDatabasePrivate.h +0 -424
  271. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexPrivate.h +0 -73
  272. data/vendor/Pods/Headers/YapDatabase/YapDatabaseStatement.h +0 -13
  273. data/vendor/Pods/Headers/YapDatabase/YapDatabaseString.h +0 -121
  274. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewChangePrivate.h +0 -94
  275. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewMappingsPrivate.h +0 -72
  276. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewPage.h +0 -36
  277. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewPageMetadata.h +0 -27
  278. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewPrivate.h +0 -153
  279. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewRangeOptionsPrivate.h +0 -17
  280. data/vendor/Pods/Headers/YapDatabase/YapMemoryTable.h +0 -74
  281. data/vendor/Pods/Headers/YapDatabase/YapNull.h +0 -17
  282. data/vendor/Pods/Headers/YapDatabase/YapTouch.h +0 -15
  283. data/vendor/Pods/Headers/____Pods-AFNetworking-prefix.h +0 -17
  284. data/vendor/Pods/Headers/____Pods-Reachability-prefix.h +0 -5
  285. data/vendor/Pods/Pods-AFNetworking-Private.xcconfig +0 -5
  286. data/vendor/Pods/Pods-AFNetworking-dummy.m +0 -5
  287. data/vendor/Pods/Pods-AFNetworking-prefix.pch +0 -17
  288. data/vendor/Pods/Pods-AFNetworking.xcconfig +0 -1
  289. data/vendor/Pods/Pods-Reachability-Private.xcconfig +0 -5
  290. data/vendor/Pods/Pods-Reachability-dummy.m +0 -5
  291. data/vendor/Pods/Pods-Reachability-prefix.pch +0 -5
  292. data/vendor/Pods/Pods-Reachability.xcconfig +0 -1
  293. data/vendor/Pods/Reachability/LICENCE.txt +0 -24
  294. data/vendor/Pods/Reachability/README.md +0 -65
  295. data/vendor/Pods/Reachability/Reachability.h +0 -109
  296. data/vendor/Pods/Reachability/Reachability.m +0 -527
@@ -0,0 +1,35 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ #import "YapDatabaseExtension.h"
4
+
5
+ #import "YapDatabaseRelationshipNode.h"
6
+ #import "YapDatabaseRelationshipEdge.h"
7
+ #import "YapDatabaseRelationshipOptions.h"
8
+ #import "YapDatabaseRelationshipConnection.h"
9
+ #import "YapDatabaseRelationshipTransaction.h"
10
+
11
+ /**
12
+ * Welcome to YapDatabase!
13
+ *
14
+ * The project page has a wealth of documentation if you have any questions.
15
+ * https://github.com/yaptv/YapDatabase
16
+ *
17
+ * If you're new to the project you may want to visit the wiki.
18
+ * https://github.com/yaptv/YapDatabase/wiki
19
+ *
20
+ * The YapDatabaseRelationship extension allow you to create relationships between objects,
21
+ * and configure automatic deletion rules.
22
+ *
23
+ * For tons of information about this extension, see the wiki article:
24
+ * https://github.com/yaptv/YapDatabase/wiki/Relationships
25
+ **/
26
+
27
+ @interface YapDatabaseRelationship : YapDatabaseExtension
28
+
29
+ - (id)init;
30
+
31
+ - (id)initWithVersion:(int)version;
32
+
33
+ - (id)initWithVersion:(int)version options:(YapDatabaseRelationshipOptions *)options;
34
+
35
+ @end
@@ -0,0 +1,29 @@
1
+ #import <Foundation/Foundation.h>
2
+ #import "YapDatabaseExtensionConnection.h"
3
+
4
+ @class YapDatabaseRelationship;
5
+
6
+ /**
7
+ * Welcome to YapDatabase!
8
+ *
9
+ * The project page has a wealth of documentation if you have any questions.
10
+ * https://github.com/yaptv/YapDatabase
11
+ *
12
+ * If you're new to the project you may want to visit the wiki.
13
+ * https://github.com/yaptv/YapDatabase/wiki
14
+ *
15
+ * The YapDatabaseRelationship extension allow you to create relationships between objects,
16
+ * and configure automatic deletion rules.
17
+ *
18
+ * For tons of information about this extension, see the wiki article:
19
+ * https://github.com/yaptv/YapDatabase/wiki/Relationships
20
+ **/
21
+
22
+ @interface YapDatabaseRelationshipConnection : YapDatabaseExtensionConnection
23
+
24
+ /**
25
+ * Returns the parent view instance.
26
+ **/
27
+ @property (nonatomic, strong, readonly) YapDatabaseRelationship *relationship;
28
+
29
+ @end
@@ -0,0 +1,163 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ /**
4
+ * Welcome to YapDatabase!
5
+ *
6
+ * The project page has a wealth of documentation if you have any questions.
7
+ * https://github.com/yaptv/YapDatabase
8
+ *
9
+ * If you're new to the project you may want to visit the wiki.
10
+ * https://github.com/yaptv/YapDatabase/wiki
11
+ *
12
+ * The YapDatabaseRelationship extension allow you to create relationships between objects,
13
+ * and configure automatic deletion rules.
14
+ *
15
+ * For tons of information about this extension, see the wiki article:
16
+ * https://github.com/yaptv/YapDatabase/wiki/Relationships
17
+ **/
18
+
19
+ enum {
20
+ // notify only
21
+ YDB_NotifyIfSourceDeleted = 1 << 0,
22
+ YDB_NotifyIfDestinationDeleted = 1 << 1,
23
+
24
+ // one-to-one
25
+ YDB_DeleteSourceIfDestinationDeleted = 1 << 2,
26
+ YDB_DeleteDestinationIfSourceDeleted = 1 << 3,
27
+
28
+ // one-to-many & many-to-many
29
+ YDB_DeleteSourceIfAllDestinationsDeleted = 1 << 4,
30
+ YDB_DeleteDestinationIfAllSourcesDeleted = 1 << 5,
31
+ };
32
+ typedef uint16_t YDB_NodeDeleteRules;
33
+
34
+
35
+ @interface YapDatabaseRelationshipEdge : NSObject <NSCoding, NSCopying>
36
+
37
+ /**
38
+ * Returns an edge with the given name, destination & nodeDeleteRules.
39
+ *
40
+ * This method is suitable for use with the YapDatabaseRelationshipNode protocol.
41
+ * When using this protocol, the source object is directly queried by the YapDatabaseRelationship extension.
42
+ * Thus the extension already knows what the source node is,
43
+ * and so the source node information (sourceKey & sourceCollection) doesn't need to be explicitly set on the edge.
44
+ *
45
+ * This method is not suitable for use with manual edge management.
46
+ * When manually adding an edge, you must fully specify the source node.
47
+ **/
48
+ + (instancetype)edgeWithName:(NSString *)name
49
+ destinationKey:(NSString *)destinationKey
50
+ collection:(NSString *)destinationCollection
51
+ nodeDeleteRules:(YDB_NodeDeleteRules)rules;
52
+
53
+ /**
54
+ * Returns an edge with the given name, destinationFilePath & nodeDeleteRules.
55
+ *
56
+ * When using a destinationFilePath, only a subset of the nodeDeleteRules apply.
57
+ * Specifically only the following work:
58
+ * - YDB_DeleteDestinationIfSourceDeleted
59
+ * - YDB_DeleteDestinationIfAllSourcesDeleted
60
+ *
61
+ * This method is suitable for use with the YapDatabaseRelationshipNode protocol.
62
+ * When using this protocol, the source object is directly queried by the YapDatabaseRelationship extension.
63
+ * Thus the extension already knows what the source node is,
64
+ * and so the source node information (sourceKey & sourceCollection) doesn't need to be explicitly set on the edge.
65
+ *
66
+ * This method is not suitable for use with manual edge management.
67
+ * When directly adding an edge, you must fully specify the source node.
68
+ **/
69
+ + (instancetype)edgeWithName:(NSString *)name
70
+ destinationFilePath:(NSString *)destinationFilePath
71
+ nodeDeleteRules:(YDB_NodeDeleteRules)rules;
72
+
73
+ /**
74
+ * Returns a fully specified edge.
75
+ *
76
+ * This method is suitable for use with manual edge management.
77
+ *
78
+ * If you're using the YapDatabaseRelationshipNode protocol, then you can use the shorter version of this method
79
+ * which doesn't specify the source node. This is because the source node is implied with the
80
+ * YapDatabaseRelationshipNode protocol, and thus doesn't need to be explicitly specified in the edge.
81
+ **/
82
+ + (instancetype)edgeWithName:(NSString *)name
83
+ sourceKey:(NSString *)sourceKey
84
+ collection:(NSString *)sourceCollection
85
+ destinationKey:(NSString *)destinationKey
86
+ collection:(NSString *)destinationCollection
87
+ nodeDeleteRules:(YDB_NodeDeleteRules)rules;
88
+
89
+ /**
90
+ * Returns a fully specified edge.
91
+ *
92
+ * When using a destinationFilePath, only a subset of the nodeDeleteRules apply.
93
+ * Specifically only the following work:
94
+ * - YDB_DeleteDestinationIfSourceDeleted
95
+ * - YDB_DeleteDestinationIfAllSourcesDeleted
96
+ *
97
+ * This method is suitable for use with manual edge management.
98
+ *
99
+ * If you're using the YapDatabaseRelationshipNode protocol, then you can use the shorter version of this method
100
+ * which doesn't specify the source node. This is because the source node is implied with the
101
+ * YapDatabaseRelationshipNode protocol, and thus doesn't need to be explicitly specified in the edge.
102
+ **/
103
+ + (instancetype)edgeWithName:(NSString *)name
104
+ sourceKey:(NSString *)sourceKey
105
+ collection:(NSString *)sourceCollection
106
+ destinationFilePath:(NSString *)destinationFilePath
107
+ nodeDeleteRules:(YDB_NodeDeleteRules)rules;
108
+
109
+ #pragma mark Init
110
+
111
+ /**
112
+ * For documentation @see edgeWithName:destinationKey:collection:nodeDeleteRules:
113
+ **/
114
+ - (id)initWithName:(NSString *)name
115
+ destinationKey:(NSString *)key
116
+ collection:(NSString *)collection
117
+ nodeDeleteRules:(YDB_NodeDeleteRules)rules;
118
+
119
+ /**
120
+ * For documentation @see edgeWithName:destinationFilePath:nodeDeleteRules:
121
+ **/
122
+ - (id)initWithName:(NSString *)name destinationFilePath:(NSString *)destinationFilePath
123
+ nodeDeleteRules:(YDB_NodeDeleteRules)rules;
124
+
125
+ /**
126
+ * For documentation @see edgeWithName:sourceKey:collection:destinationKey:collection:nodeDeleteRules:
127
+ **/
128
+ - (id)initWithName:(NSString *)name
129
+ sourceKey:(NSString *)sourceKey
130
+ collection:(NSString *)sourceCollection
131
+ destinationKey:(NSString *)destinationKey
132
+ collection:(NSString *)destinationCollection
133
+ nodeDeleteRules:(YDB_NodeDeleteRules)rules;
134
+
135
+ /**
136
+ * For documentation @see edgeWithName:sourceKey:collection:destinationFilePath:nodeDeleteRules:
137
+ **/
138
+ - (id)initWithName:(NSString *)name sourceKey:(NSString *)sourceKey
139
+ collection:(NSString *)sourceCollection
140
+ destinationFilePath:(NSString *)destinationFilePath
141
+ nodeDeleteRules:(YDB_NodeDeleteRules)rules;
142
+
143
+ #pragma mark Properties
144
+
145
+ @property (nonatomic, copy, readonly) NSString *name;
146
+
147
+ @property (nonatomic, copy, readonly) NSString *sourceKey;
148
+ @property (nonatomic, copy, readonly) NSString *sourceCollection;
149
+
150
+ @property (nonatomic, copy, readonly) NSString *destinationKey;
151
+ @property (nonatomic, copy, readonly) NSString *destinationCollection;
152
+
153
+ @property (nonatomic, copy, readonly) NSString *destinationFilePath;
154
+
155
+ @property (nonatomic, assign, readonly) YDB_NodeDeleteRules nodeDeleteRules;
156
+
157
+ /**
158
+ * NO if the edge was created via the YapDatabaseRelationshipNode protocol.
159
+ * YES if the edge was created via "manual edge management" methods.
160
+ **/
161
+ @property (nonatomic, assign, readonly) BOOL isManualEdge;
162
+
163
+ @end
@@ -0,0 +1,79 @@
1
+ #import "YapDatabaseRelationshipEdge.h"
2
+
3
+ enum {
4
+ YDB_EdgeActionNone = 0,
5
+ YDB_EdgeActionInsert = 1,
6
+ YDB_EdgeActionUpdate = 2,
7
+ YDB_EdgeActionDelete = 3
8
+ };
9
+
10
+ enum {
11
+ YDB_FlagsNone = 0,
12
+ YDB_FlagsSourceDeleted = 1 << 0,
13
+ YDB_FlagsDestinationDeleted = 1 << 1,
14
+ YDB_FlagsBadSource = 1 << 2,
15
+ YDB_FlagsBadDestination = 1 << 3,
16
+ YDB_FlagsHasSourceRowid = 1 << 4, // If set, sourceRowid lookup not needed
17
+ YDB_FlagsHasDestinationRowid = 1 << 5, // If set, destinationRowid lookup not needed
18
+ YDB_FlagsHasEdgeRowid = 1 << 6,
19
+ YDB_FlagsNotInDatabase = 1 << 7,
20
+ };
21
+
22
+
23
+ @interface YapDatabaseRelationshipEdge () {
24
+ @public
25
+
26
+ // Public properties.
27
+ // Internal code should access these directly.
28
+
29
+ NSString *name;
30
+
31
+ NSString *sourceKey;
32
+ NSString *sourceCollection;
33
+
34
+ NSString *destinationKey;
35
+ NSString *destinationCollection;
36
+
37
+ NSString *destinationFilePath;
38
+
39
+ YDB_NodeDeleteRules nodeDeleteRules;
40
+
41
+ BOOL isManualEdge;
42
+
43
+ // Internal properties.
44
+ // Internal code must access these directly.
45
+
46
+ int64_t edgeRowid;
47
+ int64_t sourceRowid;
48
+ int64_t destinationRowid;
49
+
50
+ int edgeAction;
51
+ int flags;
52
+ }
53
+
54
+ // Init directly from database row
55
+ - (id)initWithRowid:(int64_t)rowid
56
+ name:(NSString *)name
57
+ src:(int64_t)src
58
+ dst:(int64_t)dst
59
+ dstFilePath:(NSString *)dstFilePath
60
+ rules:(int)rules
61
+ manual:(BOOL)isManual;
62
+
63
+ // Copy for YapDatabaseRelationshipNode protocol
64
+ - (id)copyWithSourceKey:(NSString *)newSrcKey collection:(NSString *)newSrcCollection rowid:(int64_t)newSrcRowid;
65
+
66
+ /**
67
+ * Compares two manual edges to see if they represent the same relationship.
68
+ * That is, if both edges are manual edges, and the following are equal:
69
+ *
70
+ * - name
71
+ * - sourceKey / sourceCollection
72
+ * - destinationKey / destinationCollection
73
+ * - destinationFilePath
74
+ *
75
+ * The nodeDeleteRules do NOT need to match.
76
+ **/
77
+ - (BOOL)matchesManualEdge:(YapDatabaseRelationshipEdge *)edge;
78
+
79
+ @end
@@ -0,0 +1,99 @@
1
+ #import <Foundation/Foundation.h>
2
+ #import "YapDatabaseRelationshipEdge.h"
3
+
4
+ /**
5
+ * Welcome to YapDatabase!
6
+ *
7
+ * The project page has a wealth of documentation if you have any questions.
8
+ * https://github.com/yaptv/YapDatabase
9
+ *
10
+ * If you're new to the project you may want to visit the wiki.
11
+ * https://github.com/yaptv/YapDatabase/wiki
12
+ *
13
+ * The YapDatabaseRelationship extension allow you to create relationships between objects,
14
+ * and configure automatic deletion rules.
15
+ *
16
+ * For tons of information about this extension, see the wiki article:
17
+ * https://github.com/yaptv/YapDatabase/wiki/Relationships
18
+ **/
19
+
20
+ typedef enum {
21
+ YDB_SourceNodeDeleted,
22
+ YDB_DestinationNodeDeleted,
23
+ } YDB_NotifyReason;
24
+
25
+
26
+ /**
27
+ * There are 2 techniques you may use to add edges to the relationship graph:
28
+ *
29
+ * - Use the YapDatabaseRelationshipNode protocol
30
+ * - Manually manage the edges by adding / removing them yourself
31
+ *
32
+ * You are welcome to use either technique. In fact you can use them both simultaneously.
33
+ * Which you choose may simply be whichever works best depending on the situation.
34
+ *
35
+ * The YapDatabaseRelationshipNode protocol works quite simply:
36
+ *
37
+ * Any object that is stored in the database may optionally implement this protocol in order to
38
+ * specify a list of relationships that apply to it. The object just needs to:
39
+ * 1.) Add the YapDatabaseRelationshipNode protocol to its declared list of protocols (in header file)
40
+ * 2.) Implement the yapDatabaseRelationshipEdges method
41
+ *
42
+ * When the object is inserted or updated in the database, the YapDatabaseRelationshipExtension will automatically
43
+ * invoke the yapDatabaseRelationshipEdges method to get the list of edges. It then inserts the list of edges
44
+ * into the database (if object was inserted), or updates the previously inserted list (if object was updated).
45
+ *
46
+ * Typically this protocol is convenient to use if:
47
+ * - Your objects already contain identifiers that can be used to create the edges you desire
48
+ * - You'd like to be able to delete objects in the database by simply setting identifier properties to nil
49
+ *
50
+ * @see YapDatabaseRelationshipEdge
51
+ **/
52
+ @protocol YapDatabaseRelationshipNode <NSObject>
53
+ @required
54
+
55
+ /**
56
+ * Implement this method in order to return the edges that start from this node.
57
+ * Note that although edges are directional, the associated rules are bidirectional.
58
+ *
59
+ * In terms of edge direction, this object is the "source" of the edge.
60
+ * And the object at the other end of the edge is called the "destination".
61
+ *
62
+ * Every edge also has a name (which can be any string you specify), and a bidirectional rule.
63
+ * For example, you could specify either of the following:
64
+ * - delete the destination if I am deleted
65
+ * - delete me if the destination is deleted
66
+ *
67
+ * In fact, you could specify both of those rules simultaneously for a single edge.
68
+ * And there are similar rules if your graph is one-to-many for this node.
69
+ *
70
+ * Thus it is unnecessary to duplicate the edge on the destination node.
71
+ * So you can pick which node you'd like to create the edge(s) from.
72
+ * Either side is fine, just pick whichever is easier, or whichever makes more sense for your data model.
73
+ *
74
+ * YapDatabaseRelationship supports one-to-one, one-to-many, and even many-to-many relationships.
75
+ *
76
+ * Important: This method will not be invoked unless the object implements the protocol.
77
+ * That is, the object's class declaration must have YapDatabaseRelationshipNode in its listed protocols.
78
+ *
79
+ * @interface MyObject : NSObject <YapDatabaseRelationshipNode> // <-- Must be in protocol list
80
+ *
81
+ * @see YapDatabaseRelationshipEdge
82
+ **/
83
+ - (NSArray *)yapDatabaseRelationshipEdges;
84
+
85
+ @optional
86
+
87
+ /**
88
+ * If an edge is deleted due to one of two associated nodes being deleted,
89
+ * and the edge has a notify rule associated with it (YDB_NotifyIfSourceDeleted or YDB_NotifyIfDestinationDeleted),
90
+ * then this method may be invoked on the remaining node.
91
+ *
92
+ * It doesn't matter which side created the edge (the source or destination side).
93
+ * If the rule exists, and the remaining side implements this particular
94
+ **/
95
+ - (id)yapDatabaseRelationshipEdgeDeleted:(YapDatabaseRelationshipEdge *)edge withReason:(YDB_NotifyReason)reason;
96
+
97
+ @end
98
+
99
+
@@ -0,0 +1,59 @@
1
+ #import <Foundation/Foundation.h>
2
+
3
+ /**
4
+ * Welcome to YapDatabase!
5
+ *
6
+ * The project page has a wealth of documentation if you have any questions.
7
+ * https://github.com/yaptv/YapDatabase
8
+ *
9
+ * If you're new to the project you may want to visit the wiki.
10
+ * https://github.com/yaptv/YapDatabase/wiki
11
+ *
12
+ * The YapDatabaseRelationship extension allow you to create relationships between objects,
13
+ * and configure automatic deletion rules.
14
+ *
15
+ * For tons of information about this extension, see the wiki article:
16
+ * https://github.com/yaptv/YapDatabase/wiki/Relationships
17
+ **/
18
+
19
+ @interface YapDatabaseRelationshipOptions : NSObject <NSCopying>
20
+
21
+ /**
22
+ * You can optionally completely disable the YapDatabaseRelationshipProtocol.
23
+ *
24
+ * If you don't use it at all (i.e. you manually manage all graph edges),
25
+ * then disabling the protocol, and its related processing, can reduce overhead.
26
+ *
27
+ * The default value is NO.
28
+ **/
29
+ @property (nonatomic, assign, readwrite) BOOL disableYapDatabaseRelationshipNodeProtocol;
30
+
31
+ /**
32
+ * You can configure the extension to pre-filter all but a subset of collections.
33
+ *
34
+ * The primary motivation for this is to reduce the overhead when populating the graph.
35
+ * That is, when you first create the relationship extension, it will automatically enumerate all objects
36
+ * in the database and check to see if any of them implement the YapDatabaseRelationshipNode protocol.
37
+ * If there is only a single collection which includes objects implementing the YapDatabaseRelationshipNode protoco,
38
+ * then you could specify that collection here. So when the extension first populates itself,
39
+ * it will enumerate over just the allowedCollections, as opposed to enumerating over all collections.
40
+ * And enumerating a small subset of the entire database during graph population can improve speed,
41
+ * especially with larger databases.
42
+ *
43
+ * In addition to reducing the overhead when first populating the graph,
44
+ * the allowedCollections will pre-filter while you're making changes to the database.
45
+ * So if you add a new object to the database, and the associated collection isn't in allowedCollections,
46
+ * then the extension will skip any associated processing that would normally occur. (Things like checking to see
47
+ * if the object implements the YapDatabaseRelationshipNode protocol, and checking to see if there were previously
48
+ * any associated protocol edges for the object.)
49
+ *
50
+ * For all rows whose collection is in the allowedCollections, the extension works normally.
51
+ *
52
+ * Note: If you disable the YapDatabaseRelationshipNode protocol, then this configuration option is ignored
53
+ * because it already skips all associated processing.
54
+ *
55
+ * The default value is nil.
56
+ **/
57
+ @property (nonatomic, copy, readwrite) NSSet *allowedCollections;
58
+
59
+ @end