motion-yapper 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +3 -1
  4. data/lib/yapper.rb +3 -3
  5. data/lib/yapper/db.rb +61 -4
  6. data/lib/yapper/document/persistence.rb +4 -0
  7. data/lib/yapper/document/selection.rb +13 -0
  8. data/lib/yapper/version.rb +1 -1
  9. data/motion-yapper.gemspec +1 -1
  10. data/spec/integration/search_spec.rb +111 -0
  11. data/vendor/Podfile.lock +11 -7
  12. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.bridgesupport +16 -2
  13. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.h +10 -7
  14. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.m +20 -2
  15. metadata +19 -297
  16. data/vendor/Pods/.build/libPods-CocoaLumberjack.a +0 -0
  17. data/vendor/Pods/.build/libPods-NSData+MD5Digest.a +0 -0
  18. data/vendor/Pods/.build/libPods-YapDatabase.a +0 -0
  19. data/vendor/Pods/.build/libPods.a +0 -0
  20. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDASLLogger.h +0 -41
  21. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDAbstractDatabaseLogger.h +0 -102
  22. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDContextFilterLogFormatter.h +0 -63
  23. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDDispatchQueueLogFormatter.h +0 -128
  24. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDFileLogger.h +0 -369
  25. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog+LOGV.h +0 -99
  26. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog.h +0 -634
  27. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDMultiFormatter.h +0 -30
  28. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDTTYLogger.h +0 -181
  29. data/vendor/Pods/BuildHeaders/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
  30. data/vendor/Pods/BuildHeaders/YapDatabase/NSDictionary+YapDatabase.h +0 -8
  31. data/vendor/Pods/BuildHeaders/YapDatabase/YapCache.h +0 -91
  32. data/vendor/Pods/BuildHeaders/YapDatabase/YapCollectionKey.h +0 -23
  33. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabase.h +0 -547
  34. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnection.h +0 -449
  35. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnectionState.h +0 -29
  36. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseDefaults.h +0 -37
  37. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtension.h +0 -15
  38. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionConnection.h +0 -11
  39. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionPrivate.h +0 -444
  40. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionTransaction.h +0 -11
  41. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredView.h +0 -81
  42. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewConnection.h +0 -12
  43. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewPrivate.h +0 -17
  44. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTransaction.h +0 -39
  45. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTypes.h +0 -32
  46. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearch.h +0 -89
  47. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchConnection.h +0 -32
  48. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchPrivate.h +0 -77
  49. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
  50. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchTransaction.h +0 -68
  51. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseLogging.h +0 -158
  52. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseManager.h +0 -17
  53. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabasePrivate.h +0 -446
  54. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseQuery.h +0 -42
  55. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationship.h +0 -35
  56. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipConnection.h +0 -29
  57. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdge.h +0 -163
  58. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdgePrivate.h +0 -79
  59. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipNode.h +0 -99
  60. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipOptions.h +0 -59
  61. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipPrivate.h +0 -125
  62. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipTransaction.h +0 -384
  63. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndex.h +0 -149
  64. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexConnection.h +0 -33
  65. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexPrivate.h +0 -83
  66. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetup.h +0 -33
  67. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetupPrivate.h +0 -18
  68. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexTransaction.h +0 -58
  69. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseStatement.h +0 -13
  70. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseString.h +0 -121
  71. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseTransaction.h +0 -651
  72. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseView.h +0 -127
  73. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChange.h +0 -272
  74. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChangePrivate.h +0 -94
  75. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewConnection.h +0 -116
  76. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappings.h +0 -842
  77. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappingsPrivate.h +0 -72
  78. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewOptions.h +0 -63
  79. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPage.h +0 -36
  80. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPageMetadata.h +0 -27
  81. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPrivate.h +0 -170
  82. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewRangeOptions.h +0 -330
  83. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewRangeOptionsPrivate.h +0 -17
  84. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTransaction.h +0 -498
  85. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTypes.h +0 -99
  86. data/vendor/Pods/BuildHeaders/YapDatabase/YapMemoryTable.h +0 -74
  87. data/vendor/Pods/BuildHeaders/YapDatabase/YapNull.h +0 -17
  88. data/vendor/Pods/BuildHeaders/YapDatabase/YapSet.h +0 -41
  89. data/vendor/Pods/BuildHeaders/YapDatabase/YapTouch.h +0 -15
  90. data/vendor/Pods/CocoaLumberjack/LICENSE.txt +0 -18
  91. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.h +0 -41
  92. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.m +0 -100
  93. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.h +0 -102
  94. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.m +0 -727
  95. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.h +0 -369
  96. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.m +0 -1539
  97. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog+LOGV.h +0 -99
  98. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.h +0 -634
  99. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.m +0 -1208
  100. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.h +0 -181
  101. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.m +0 -1520
  102. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.h +0 -63
  103. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.m +0 -191
  104. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.h +0 -128
  105. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.m +0 -253
  106. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.h +0 -30
  107. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.m +0 -127
  108. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/README.txt +0 -7
  109. data/vendor/Pods/CocoaLumberjack/README.markdown +0 -74
  110. data/vendor/Pods/Headers/CocoaLumberjack/DDASLLogger.h +0 -41
  111. data/vendor/Pods/Headers/CocoaLumberjack/DDAbstractDatabaseLogger.h +0 -102
  112. data/vendor/Pods/Headers/CocoaLumberjack/DDContextFilterLogFormatter.h +0 -63
  113. data/vendor/Pods/Headers/CocoaLumberjack/DDDispatchQueueLogFormatter.h +0 -128
  114. data/vendor/Pods/Headers/CocoaLumberjack/DDFileLogger.h +0 -369
  115. data/vendor/Pods/Headers/CocoaLumberjack/DDLog+LOGV.h +0 -99
  116. data/vendor/Pods/Headers/CocoaLumberjack/DDLog.h +0 -634
  117. data/vendor/Pods/Headers/CocoaLumberjack/DDMultiFormatter.h +0 -30
  118. data/vendor/Pods/Headers/CocoaLumberjack/DDTTYLogger.h +0 -181
  119. data/vendor/Pods/Headers/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
  120. data/vendor/Pods/Headers/YapDatabase/YapCollectionKey.h +0 -23
  121. data/vendor/Pods/Headers/YapDatabase/YapDatabase.h +0 -547
  122. data/vendor/Pods/Headers/YapDatabase/YapDatabaseConnection.h +0 -449
  123. data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtension.h +0 -15
  124. data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionConnection.h +0 -11
  125. data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionTransaction.h +0 -11
  126. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredView.h +0 -81
  127. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewConnection.h +0 -12
  128. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTransaction.h +0 -39
  129. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTypes.h +0 -32
  130. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearch.h +0 -89
  131. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchConnection.h +0 -32
  132. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
  133. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchTransaction.h +0 -68
  134. data/vendor/Pods/Headers/YapDatabase/YapDatabaseQuery.h +0 -42
  135. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationship.h +0 -35
  136. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipConnection.h +0 -29
  137. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipEdge.h +0 -163
  138. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipNode.h +0 -99
  139. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipOptions.h +0 -59
  140. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipTransaction.h +0 -384
  141. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndex.h +0 -149
  142. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexConnection.h +0 -33
  143. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexSetup.h +0 -33
  144. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexTransaction.h +0 -58
  145. data/vendor/Pods/Headers/YapDatabase/YapDatabaseTransaction.h +0 -651
  146. data/vendor/Pods/Headers/YapDatabase/YapDatabaseView.h +0 -127
  147. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewChange.h +0 -272
  148. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewConnection.h +0 -116
  149. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewMappings.h +0 -842
  150. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewOptions.h +0 -63
  151. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewRangeOptions.h +0 -330
  152. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTransaction.h +0 -498
  153. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTypes.h +0 -99
  154. data/vendor/Pods/Headers/YapDatabase/YapSet.h +0 -41
  155. data/vendor/Pods/Headers/____Pods-CocoaLumberjack-prefix.h +0 -7
  156. data/vendor/Pods/Headers/____Pods-NSData+MD5Digest-prefix.h +0 -5
  157. data/vendor/Pods/Headers/____Pods-YapDatabase-prefix.h +0 -5
  158. data/vendor/Pods/Headers/____Pods-environment.h +0 -38
  159. data/vendor/Pods/Manifest.lock +0 -22
  160. data/vendor/Pods/NSData+MD5Digest/NSData+MD5Digest/NSData+MD5Digest.h +0 -18
  161. data/vendor/Pods/NSData+MD5Digest/NSData+MD5Digest/NSData+MD5Digest.m +0 -39
  162. data/vendor/Pods/NSData+MD5Digest/README.md +0 -11
  163. data/vendor/Pods/Pods-CocoaLumberjack-Private.xcconfig +0 -5
  164. data/vendor/Pods/Pods-CocoaLumberjack-dummy.m +0 -5
  165. data/vendor/Pods/Pods-CocoaLumberjack-prefix.pch +0 -7
  166. data/vendor/Pods/Pods-CocoaLumberjack.xcconfig +0 -0
  167. data/vendor/Pods/Pods-NSData+MD5Digest-Private.xcconfig +0 -5
  168. data/vendor/Pods/Pods-NSData+MD5Digest-dummy.m +0 -5
  169. data/vendor/Pods/Pods-NSData+MD5Digest-prefix.pch +0 -5
  170. data/vendor/Pods/Pods-NSData+MD5Digest.xcconfig +0 -0
  171. data/vendor/Pods/Pods-YapDatabase-Private.xcconfig +0 -5
  172. data/vendor/Pods/Pods-YapDatabase-dummy.m +0 -5
  173. data/vendor/Pods/Pods-YapDatabase-prefix.pch +0 -5
  174. data/vendor/Pods/Pods-YapDatabase.xcconfig +0 -1
  175. data/vendor/Pods/Pods-acknowledgements.markdown +0 -59
  176. data/vendor/Pods/Pods-acknowledgements.plist +0 -97
  177. data/vendor/Pods/Pods-dummy.m +0 -5
  178. data/vendor/Pods/Pods-environment.h +0 -38
  179. data/vendor/Pods/Pods-resources.sh +0 -68
  180. data/vendor/Pods/Pods.xcconfig +0 -5
  181. data/vendor/Pods/Pods.xcodeproj/project.pbxproj +0 -4807
  182. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-CocoaLumberjack.xcscheme +0 -59
  183. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-NSData+MD5Digest.xcscheme +0 -59
  184. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-YapDatabase.xcscheme +0 -59
  185. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods.xcscheme +0 -59
  186. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/xcschememanagement.plist +0 -31
  187. data/vendor/Pods/YapDatabase/LICENSE.txt +0 -18
  188. data/vendor/Pods/YapDatabase/README.md +0 -32
  189. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/Internal/YapDatabaseFilteredViewPrivate.h +0 -17
  190. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.h +0 -81
  191. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.m +0 -159
  192. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewConnection.h +0 -12
  193. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewConnection.m +0 -41
  194. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.h +0 -39
  195. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.m +0 -1235
  196. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTypes.h +0 -32
  197. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/Internal/YapDatabaseFullTextSearchPrivate.h +0 -77
  198. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearch.h +0 -89
  199. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearch.m +0 -146
  200. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.h +0 -32
  201. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.m +0 -298
  202. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchSnippetOptions.h +0 -79
  203. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchSnippetOptions.m +0 -95
  204. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.h +0 -68
  205. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.m +0 -1403
  206. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/Internal/YapDatabaseExtensionPrivate.h +0 -444
  207. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.h +0 -15
  208. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.m +0 -83
  209. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.h +0 -11
  210. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.m +0 -46
  211. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.h +0 -11
  212. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.m +0 -204
  213. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipEdgePrivate.h +0 -79
  214. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipPrivate.h +0 -125
  215. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.h +0 -35
  216. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.m +0 -129
  217. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.h +0 -29
  218. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.m +0 -802
  219. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.h +0 -163
  220. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.m +0 -408
  221. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipNode.h +0 -99
  222. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.h +0 -59
  223. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.m +0 -29
  224. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.h +0 -384
  225. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.m +0 -5254
  226. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexPrivate.h +0 -83
  227. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexSetupPrivate.h +0 -18
  228. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.h +0 -149
  229. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.m +0 -161
  230. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.h +0 -33
  231. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.m +0 -331
  232. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.h +0 -33
  233. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.m +0 -245
  234. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.h +0 -58
  235. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.m +0 -1269
  236. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewChangePrivate.h +0 -94
  237. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewMappingsPrivate.h +0 -72
  238. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPage.h +0 -36
  239. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPage.mm +0 -296
  240. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPageMetadata.h +0 -27
  241. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPageMetadata.m +0 -28
  242. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPrivate.h +0 -170
  243. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewRangeOptionsPrivate.h +0 -17
  244. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.h +0 -272
  245. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.m +0 -2500
  246. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.h +0 -842
  247. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.m +0 -1714
  248. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewRangeOptions.h +0 -330
  249. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewRangeOptions.m +0 -141
  250. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.h +0 -127
  251. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.m +0 -194
  252. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.h +0 -116
  253. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.m +0 -888
  254. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.h +0 -63
  255. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.m +0 -27
  256. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.h +0 -498
  257. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.m +0 -4986
  258. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTypes.h +0 -99
  259. data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.h +0 -8
  260. data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.m +0 -19
  261. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.h +0 -91
  262. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.m +0 -465
  263. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseConnectionState.h +0 -29
  264. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseConnectionState.m +0 -48
  265. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.h +0 -37
  266. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.m +0 -83
  267. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseLogging.h +0 -158
  268. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseLogging.m +0 -73
  269. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseManager.h +0 -17
  270. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseManager.m +0 -56
  271. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabasePrivate.h +0 -446
  272. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseStatement.h +0 -13
  273. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseStatement.m +0 -26
  274. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseString.h +0 -121
  275. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapMemoryTable.h +0 -74
  276. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapMemoryTable.m +0 -603
  277. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.h +0 -17
  278. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.m +0 -35
  279. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapTouch.h +0 -15
  280. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapTouch.m +0 -31
  281. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.h +0 -23
  282. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.m +0 -199
  283. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.h +0 -42
  284. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapDatabaseQuery.m +0 -96
  285. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapSet.h +0 -41
  286. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapSet.m +0 -82
  287. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.h +0 -547
  288. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.m +0 -2013
  289. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.h +0 -449
  290. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.m +0 -4046
  291. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.h +0 -651
  292. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.m +0 -5602
  293. data/vendor/Pods/build-iPhoneSimulator/Pods.bridgesupport +0 -3172
  294. data/vendor/Pods/build-iPhoneSimulator/libPods.a +0 -0
@@ -1,163 +0,0 @@
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
@@ -1,408 +0,0 @@
1
- #import "YapDatabaseRelationshipEdge.h"
2
- #import "YapDatabaseRelationshipEdgePrivate.h"
3
-
4
-
5
- @implementation YapDatabaseRelationshipEdge
6
-
7
- @synthesize name = name;
8
-
9
- @synthesize sourceCollection = sourceCollection;
10
- @synthesize sourceKey = sourceKey;
11
-
12
- @synthesize destinationCollection = destinationCollection;
13
- @synthesize destinationKey = destinationKey;
14
-
15
- @synthesize destinationFilePath = destinationFilePath;
16
-
17
- @synthesize nodeDeleteRules = nodeDeleteRules;
18
- @synthesize isManualEdge = isManualEdge;
19
-
20
- #pragma mark Class Init
21
-
22
- + (instancetype)edgeWithName:(NSString *)name
23
- destinationKey:(NSString *)destinationKey
24
- collection:(NSString *)destinationCollection
25
- nodeDeleteRules:(YDB_NodeDeleteRules)rules
26
- {
27
- return [[YapDatabaseRelationshipEdge alloc] initWithName:name
28
- destinationKey:destinationKey
29
- collection:destinationCollection
30
- nodeDeleteRules:rules];
31
- }
32
-
33
- + (instancetype)edgeWithName:(NSString *)name
34
- destinationFilePath:(NSString *)destinationFilePath
35
- nodeDeleteRules:(YDB_NodeDeleteRules)rules
36
- {
37
- return [[YapDatabaseRelationshipEdge alloc] initWithName:name
38
- destinationFilePath:destinationFilePath
39
- nodeDeleteRules:rules];
40
- }
41
-
42
- + (instancetype)edgeWithName:(NSString *)name
43
- sourceKey:(NSString *)sourceKey
44
- collection:(NSString *)sourceCollection
45
- destinationKey:(NSString *)destinationKey
46
- collection:(NSString *)destinationCollection
47
- nodeDeleteRules:(YDB_NodeDeleteRules)rules
48
- {
49
- return [[YapDatabaseRelationshipEdge alloc] initWithName:name
50
- sourceKey:sourceKey
51
- collection:sourceCollection
52
- destinationKey:destinationKey
53
- collection:destinationCollection
54
- nodeDeleteRules:rules];
55
- }
56
-
57
- + (instancetype)edgeWithName:(NSString *)name
58
- sourceKey:(NSString *)sourceKey
59
- collection:(NSString *)sourceCollection
60
- destinationFilePath:(NSString *)destinationFilePath
61
- nodeDeleteRules:(YDB_NodeDeleteRules)rules
62
- {
63
- return [[YapDatabaseRelationshipEdge alloc] initWithName:name
64
- sourceKey:sourceKey
65
- collection:sourceCollection
66
- destinationFilePath:destinationFilePath
67
- nodeDeleteRules:rules];
68
- }
69
-
70
- #pragma mark Init
71
-
72
- /**
73
- * Public init method.
74
- * Suitable for use with YapDatabaseRelationshipNode protocol.
75
- **/
76
- - (id)initWithName:(NSString *)inName
77
- destinationKey:(NSString *)dstKey
78
- collection:(NSString *)dstCollection
79
- nodeDeleteRules:(YDB_NodeDeleteRules)rules
80
- {
81
- if (inName == nil) return nil; // Edge requires name
82
- if (dstKey == nil) return nil; // Edge requires destination
83
-
84
- if ((self = [super init]))
85
- {
86
- name = [inName copy];
87
-
88
- destinationKey = [dstKey copy];
89
- destinationCollection = dstCollection ? [dstCollection copy] : @"";
90
-
91
- nodeDeleteRules = rules;
92
- isManualEdge = NO;
93
- }
94
- return self;
95
- }
96
-
97
- /**
98
- * Public init method.
99
- * Suitable for use with YapDatabaseRelationshipNode protocol.
100
- **/
101
- - (id)initWithName:(NSString *)inName destinationFilePath:(NSString *)dstFilePath
102
- nodeDeleteRules:(YDB_NodeDeleteRules)rules
103
- {
104
- if (inName == nil) return nil; // Edge requires name
105
- if (dstFilePath == nil) return nil; // Edge requires destination
106
-
107
- if ((self = [super init]))
108
- {
109
- name = [inName copy];
110
-
111
- destinationFilePath = [dstFilePath copy];
112
-
113
- nodeDeleteRules = rules;
114
- isManualEdge = NO;
115
-
116
- flags = YDB_FlagsHasDestinationRowid; // no need for destinationRowid lookup
117
- }
118
- return self;
119
- }
120
-
121
- /**
122
- * Public init method.
123
- * Suitable for use with manual edge management.
124
- **/
125
- - (id)initWithName:(NSString *)inName
126
- sourceKey:(NSString *)srcKey
127
- collection:(NSString *)srcCollection
128
- destinationKey:(NSString *)dstKey
129
- collection:(NSString *)dstCollection
130
- nodeDeleteRules:(YDB_NodeDeleteRules)rules
131
- {
132
- if (inName == nil) return nil; // Edge requires name
133
- if (srcKey == nil) return nil; // Edge requires source
134
- if (dstKey == nil) return nil; // Edge requires destination
135
-
136
- if ((self = [super init]))
137
- {
138
- name = [inName copy];
139
-
140
- sourceKey = [srcKey copy];
141
- sourceCollection = srcCollection ? [srcCollection copy] : @"";
142
-
143
- destinationKey = [dstKey copy];
144
- destinationCollection = dstCollection ? [dstCollection copy] : @"";
145
-
146
- nodeDeleteRules = rules;
147
- isManualEdge = YES;
148
- }
149
- return self;
150
- }
151
-
152
- - (id)initWithName:(NSString *)inName sourceKey:(NSString *)srcKey
153
- collection:(NSString *)srcCollection
154
- destinationFilePath:(NSString *)dstFilePath
155
- nodeDeleteRules:(YDB_NodeDeleteRules)rules
156
- {
157
- if (inName == nil) return nil; // Edge requires name
158
- if (srcKey == nil) return nil; // Edge requires source
159
- if (dstFilePath == nil) return nil; // Edge requires destination
160
-
161
- if ((self = [super init]))
162
- {
163
- name = [inName copy];
164
-
165
- sourceKey = [srcKey copy];
166
- sourceCollection = srcCollection ? [srcCollection copy] : @"";
167
-
168
- destinationFilePath = [dstFilePath copy];
169
-
170
- nodeDeleteRules = rules;
171
- isManualEdge = YES;
172
-
173
- flags = YDB_FlagsHasDestinationRowid; // no need for destinationRowid lookup
174
- }
175
- return self;
176
- }
177
-
178
- /**
179
- * Internal init method.
180
- * This method is used when reading an edge from a row in the database.
181
- **/
182
- - (id)initWithRowid:(int64_t)rowid
183
- name:(NSString *)inName
184
- src:(int64_t)src
185
- dst:(int64_t)dst
186
- dstFilePath:(NSString *)dstFilePath
187
- rules:(int)rules
188
- manual:(BOOL)manual
189
- {
190
- if ((self = [super init]))
191
- {
192
- name = [inName copy];
193
- destinationFilePath = [dstFilePath copy];
194
- nodeDeleteRules = rules;
195
- isManualEdge = manual;
196
-
197
- edgeRowid = rowid;
198
- sourceRowid = src;
199
- destinationRowid = dst;
200
-
201
- flags = YDB_FlagsHasSourceRowid | YDB_FlagsHasDestinationRowid | YDB_FlagsHasEdgeRowid;
202
- }
203
- return self;
204
- }
205
-
206
- #pragma mark NSCoding
207
-
208
- - (id)initWithCoder:(NSCoder *)decoder
209
- {
210
- if ((self = [super init]))
211
- {
212
- name = [decoder decodeObjectForKey:@"name"];
213
-
214
- sourceKey = [decoder decodeObjectForKey:@"sourceKey"];
215
- sourceCollection = [decoder decodeObjectForKey:@"sourceCollection"];
216
-
217
- destinationKey = [decoder decodeObjectForKey:@"destinationKey"];
218
- destinationCollection = [decoder decodeObjectForKey:@"destinationCollection"];
219
-
220
- destinationFilePath = [decoder decodeObjectForKey:@"destinationFilePath"];
221
-
222
- nodeDeleteRules = [decoder decodeIntForKey:@"nodeDeleteRules"];
223
- isManualEdge = [decoder decodeBoolForKey:@"isManualEdge"];
224
-
225
- if (destinationFilePath)
226
- flags = YDB_FlagsHasDestinationRowid;
227
- else
228
- flags = YDB_FlagsNone;
229
- }
230
- return self;
231
- }
232
-
233
- - (void)encodeWithCoder:(NSCoder *)coder
234
- {
235
- [coder encodeObject:name forKey:@"name"];
236
-
237
- [coder encodeObject:sourceKey forKey:@"sourceKey"];
238
- [coder encodeObject:sourceCollection forKey:@"sourceCollection"];
239
-
240
- [coder encodeObject:destinationKey forKey:@"destinationKey"];
241
- [coder encodeObject:destinationCollection forKey:@"destinationCollection"];
242
-
243
- [coder encodeObject:destinationFilePath forKey:@"destinationFilePath"];
244
-
245
- [coder encodeInt:nodeDeleteRules forKey:@"nodeDeleteRules"];
246
- [coder encodeBool:isManualEdge forKey:@"isManualEdge"];
247
- }
248
-
249
- #pragma mark NSCopying
250
-
251
- - (id)copyWithZone:(NSZone *)zone
252
- {
253
- YapDatabaseRelationshipEdge *copy = [[YapDatabaseRelationshipEdge alloc] init];
254
-
255
- copy->name = name;
256
- copy->sourceKey = sourceKey;
257
- copy->sourceCollection = sourceCollection;
258
- copy->destinationKey = destinationKey;
259
- copy->destinationCollection = destinationCollection;
260
- copy->destinationFilePath = destinationFilePath;
261
- copy->nodeDeleteRules = nodeDeleteRules;
262
- copy->isManualEdge = isManualEdge;
263
-
264
- copy->edgeRowid = edgeRowid;
265
- copy->sourceRowid = sourceRowid;
266
- copy->destinationRowid = destinationRowid;
267
-
268
- copy->edgeAction = YDB_EdgeActionNone; // Return a clean copy
269
- copy->flags = YDB_FlagsNone; // Return a clean copy
270
-
271
- // Set appropriate flags
272
-
273
- if ((flags & YDB_FlagsHasSourceRowid))
274
- copy->flags |= YDB_FlagsHasSourceRowid;
275
-
276
- if ((flags & YDB_FlagsHasDestinationRowid) || destinationFilePath)
277
- copy->flags |= YDB_FlagsHasDestinationRowid;
278
-
279
- if ((flags & YDB_FlagsHasEdgeRowid))
280
- copy->flags |= YDB_FlagsHasEdgeRowid;
281
-
282
- return copy;
283
- }
284
-
285
- - (id)copyWithSourceKey:(NSString *)newSrcKey collection:(NSString *)newSrcCollection rowid:(int64_t)newSrcRowid
286
- {
287
- YapDatabaseRelationshipEdge *copy = [[YapDatabaseRelationshipEdge alloc] init];
288
-
289
- copy->name = name;
290
- copy->sourceKey = [newSrcKey copy];
291
- copy->sourceCollection = [newSrcCollection copy];
292
- copy->destinationKey = destinationKey;
293
- copy->destinationCollection = destinationCollection;
294
- copy->destinationFilePath = destinationFilePath;
295
- copy->nodeDeleteRules = nodeDeleteRules;
296
- copy->isManualEdge = NO; // Force proper value
297
-
298
- copy->edgeRowid = edgeRowid;
299
- copy->sourceRowid = newSrcRowid;
300
- copy->destinationRowid = destinationRowid;
301
-
302
- copy->edgeAction = YDB_EdgeActionNone; // Return a clean copy
303
- copy->flags = YDB_FlagsNone; // Return a clean copy
304
-
305
- // Set appropriate flags
306
-
307
- copy->flags |= YDB_FlagsHasSourceRowid;
308
-
309
- if ((flags & YDB_FlagsHasDestinationRowid) || destinationFilePath)
310
- copy->flags |= YDB_FlagsHasDestinationRowid;
311
-
312
- if ((flags & YDB_FlagsHasEdgeRowid))
313
- copy->flags |= YDB_FlagsHasEdgeRowid;
314
-
315
- return copy;
316
- }
317
-
318
- #pragma mark Comparison
319
-
320
- /**
321
- * Compares two manual edges to see if they represent the same relationship.
322
- * That is, if both edges are manual edges, and the following are equal:
323
- *
324
- * - name
325
- * - sourceKey / sourceCollection
326
- * - destinationKey / destinationCollection
327
- * - destinationFilePath
328
- *
329
- * The nodeDeleteRules do NOT need to match.
330
- **/
331
- - (BOOL)matchesManualEdge:(YapDatabaseRelationshipEdge *)edge
332
- {
333
- if (edge == nil) return NO;
334
-
335
- if (!isManualEdge) return NO;
336
- if (!edge->isManualEdge) return NO;
337
-
338
- if (![name isEqualToString:edge->name]) return NO;
339
-
340
- if (![sourceKey isEqualToString:edge->sourceKey]) return NO;
341
- if (![sourceCollection isEqualToString:edge->sourceCollection]) return NO;
342
-
343
- if (destinationFilePath)
344
- {
345
- if (![destinationFilePath isEqualToString:edge->destinationFilePath]) return NO;
346
- }
347
- else
348
- {
349
- if (![destinationKey isEqualToString:edge->destinationKey]) return NO;
350
- if (![destinationCollection isEqualToString:edge->destinationCollection]) return NO;
351
- }
352
-
353
- return YES;
354
- }
355
-
356
- #pragma mark Description
357
-
358
- - (NSString *)description
359
- {
360
- NSMutableString *rules = [NSMutableString stringWithCapacity:64];
361
-
362
- if (nodeDeleteRules & YDB_NotifyIfSourceDeleted)
363
- [rules appendString:@"NotifyIfSourceDeleted, "];
364
-
365
- if (nodeDeleteRules & YDB_NotifyIfDestinationDeleted)
366
- [rules appendString:@"NotifyIfDestinationDeleted, "];
367
-
368
- if (nodeDeleteRules & YDB_DeleteSourceIfDestinationDeleted)
369
- [rules appendString:@"DeleteSourceIfDestinationDeleted, "];
370
-
371
- if (nodeDeleteRules & YDB_DeleteDestinationIfSourceDeleted)
372
- [rules appendString:@"DeleteDestinationIfSourceDeleted, "];
373
-
374
- if (nodeDeleteRules & YDB_DeleteSourceIfAllDestinationsDeleted)
375
- [rules appendString:@"DeleteSourceIfAllDestinationsDeleted, "];
376
-
377
- if (nodeDeleteRules & YDB_DeleteDestinationIfAllSourcesDeleted)
378
- [rules appendString:@"DeleteDestinationIfAllSourcesDeleted, "];
379
-
380
- if ([rules length] > 0)
381
- [rules deleteCharactersInRange:NSMakeRange([rules length] - 2, 2)];
382
-
383
- NSMutableString *description = [NSMutableString stringWithCapacity:128];
384
-
385
- [description appendFormat:@"<YapDatabaseRelationshipEdge[%p]", self];
386
- [description appendFormat:@" name(%@)", name];
387
-
388
- if (sourceKey)
389
- [description appendFormat:@" src(%@, %@)", sourceKey, (sourceCollection ?: @"")];
390
-
391
- if (destinationKey)
392
- [description appendFormat:@" dst(%@, %@)", destinationKey, (destinationCollection ?: @"")];
393
- else
394
- [description appendFormat:@" dstFilePath(%@)", destinationFilePath];
395
-
396
- [description appendFormat:@" rules(%@)", rules];
397
-
398
- if (isManualEdge)
399
- {
400
- [description appendString:@" manual"];
401
- }
402
-
403
- [description appendString:@">"];
404
-
405
- return description;
406
- }
407
-
408
- @end