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,68 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
-
3
- #import "YapDatabaseExtensionTransaction.h"
4
- #import "YapDatabaseFullTextSearchSnippetOptions.h"
5
-
6
-
7
- /**
8
- * Welcome to YapDatabase!
9
- *
10
- * The project page has a wealth of documentation if you have any questions.
11
- * https://github.com/yaptv/YapDatabase
12
- *
13
- * If you're new to the project you may want to check out the wiki
14
- * https://github.com/yaptv/YapDatabase/wiki
15
- *
16
- * YapDatabaseFullTextSearch is an extension for performing text based search.
17
- * Internally it uses sqlite's FTS module which was contributed by Google.
18
- *
19
- * After registering the extension, you can access this class within a regular transaction.
20
- * For example:
21
- *
22
- * [databaseConnection readWithBlock:^(YapDatabaseReadTransaction *transaction){
23
- *
24
- * [[transaction ext:@"mySearch"] enumerateKeysMatching:@"birthday party"
25
- * usingBlock:^(NSString *collection, NSString *key, BOOL *stop){
26
- * // matching row...
27
- * }]
28
- * }];
29
- **/
30
- @interface YapDatabaseFullTextSearchTransaction : YapDatabaseExtensionTransaction
31
-
32
- // Regular query matching
33
-
34
- - (void)enumerateKeysMatching:(NSString *)query
35
- usingBlock:(void (^)(NSString *collection, NSString *key, BOOL *stop))block;
36
-
37
- - (void)enumerateKeysAndMetadataMatching:(NSString *)query
38
- usingBlock:(void (^)(NSString *collection, NSString *key, id metadata, BOOL *stop))block;
39
-
40
- - (void)enumerateKeysAndObjectsMatching:(NSString *)query
41
- usingBlock:(void (^)(NSString *collection, NSString *key, id object, BOOL *stop))block;
42
-
43
- - (void)enumerateRowsMatching:(NSString *)query
44
- usingBlock:(void (^)(NSString *collection, NSString *key, id object, id metadata, BOOL *stop))block;
45
-
46
- // Query matching + Snippets
47
-
48
- - (void)enumerateKeysMatching:(NSString *)query
49
- withSnippetOptions:(YapDatabaseFullTextSearchSnippetOptions *)options
50
- usingBlock:
51
- (void (^)(NSString *snippet, NSString *collection, NSString *key, BOOL *stop))block;
52
-
53
- - (void)enumerateKeysAndMetadataMatching:(NSString *)query
54
- withSnippetOptions:(YapDatabaseFullTextSearchSnippetOptions *)options
55
- usingBlock:
56
- (void (^)(NSString *snippet, NSString *collection, NSString *key, id metadata, BOOL *stop))block;
57
-
58
- - (void)enumerateKeysAndObjectsMatching:(NSString *)query
59
- withSnippetOptions:(YapDatabaseFullTextSearchSnippetOptions *)options
60
- usingBlock:
61
- (void (^)(NSString *snippet, NSString *collection, NSString *key, id object, BOOL *stop))block;
62
-
63
- - (void)enumerateRowsMatching:(NSString *)query
64
- withSnippetOptions:(YapDatabaseFullTextSearchSnippetOptions *)options
65
- usingBlock:
66
- (void (^)(NSString *snippet, NSString *collection, NSString *key, id object, id metadata, BOOL *stop))block;
67
-
68
- @end
@@ -1,158 +0,0 @@
1
- /**
2
- * Logging plays a very important role in open-source libraries.
3
- *
4
- * Good documentation and comments decrease the learning time required to use a library.
5
- * But proper logging takes this futher by:
6
- * - Providing a way to trace the execution of the library
7
- * - Allowing developers to quickly identify subsets of the code that need analysis
8
- * - Making it easier for developers to find potential bugs, either in their code or the library
9
- * - Drawing attention to potential mis-configurations or mis-uses of the API
10
- *
11
- * Ultimately logging is an interactive extension to comments.
12
- **/
13
-
14
- /**
15
- * Define log levels.
16
- * YapDatabase uses 4 log levels:
17
- *
18
- * error - For critical errors that will likely break functionality
19
- * warn - For problems that are concerning, but not quite critical
20
- * info - For general, but important, information such as performing a database upgrade
21
- * verbose - For all the other low-level debugging type information
22
- *
23
- * Notice that the levels are actually defined using bitwise flags.
24
- * This means you have full control to flip individual logs on/off.
25
- * For example, you could enable errors and info, but not warnings, if you wanted.
26
- **/
27
-
28
- #define YDB_LOG_FLAG_ERROR (1 << 0) // 0...00001
29
- #define YDB_LOG_FLAG_WARN (1 << 1) // 0...00010
30
- #define YDB_LOG_FLAG_INFO (1 << 2) // 0...00100
31
- #define YDB_LOG_FLAG_VERBOSE (1 << 3) // 0...01000
32
-
33
- #define YDB_LOG_LEVEL_OFF 0 // 0...00000
34
- #define YDB_LOG_LEVEL_ERROR (YDB_LOG_LEVEL_OFF | YDB_LOG_FLAG_ERROR) // 0...00001
35
- #define YDB_LOG_LEVEL_WARN (YDB_LOG_LEVEL_ERROR | YDB_LOG_FLAG_WARN) // 0...00011
36
- #define YDB_LOG_LEVEL_INFO (YDB_LOG_LEVEL_WARN | YDB_LOG_FLAG_INFO) // 0...00111
37
- #define YDB_LOG_LEVEL_VERBOSE (YDB_LOG_LEVEL_INFO | YDB_LOG_FLAG_VERBOSE) // 0...01111
38
-
39
- #define YDB_LOG_ERROR (ydbLogLevel & YDB_LOG_LEVEL_ERROR)
40
- #define YDB_LOG_WARN (ydbLogLevel & YDB_LOG_LEVEL_WARN)
41
- #define YDB_LOG_INFO (ydbLogLevel & YDB_LOG_LEVEL_INFO)
42
- #define YDB_LOG_VERBOSE (ydbLogLevel & YDB_LOG_LEVEL_VERBOSE)
43
-
44
- /**
45
- * Define trace, which is in addition to log levels.
46
- * It may be turned on/off independent of the log level.
47
- **/
48
-
49
- #define YDB_LOG_FLAG_TRACE (1 << 4) // 0...10000
50
-
51
- /**
52
- * YapDatabase supports multiple logging techniques.
53
- *
54
- * YapDatabase supports the CocoaLumberjack logging framework.
55
- * This is a professional open-source logging library for Mac and iOS development.
56
- *
57
- * If you're not using Lumberjack then you can downgrade to NSLog.
58
- * You can also completely disable logging throughout the entire library.
59
- *
60
- * You are strongly discouraged from modifying this file.
61
- * If you do, you make it more difficult on yourself to merge future bug fixes and improvements from the project.
62
- * Instead, you should override the default values in your own application.
63
- **/
64
-
65
- #define YapDatabaseLoggingTechnique_Lumberjack 2 // optimal
66
- #define YapDatabaseLoggingTechnique_NSLog 1 // slower
67
- #define YapDatabaseLoggingTechnique_Disabled 0 // disabled
68
-
69
- #ifndef YapDatabaseLoggingTechnique
70
- #define YapDatabaseLoggingTechnique YapDatabaseLoggingTechnique_Lumberjack
71
- #endif
72
-
73
- /**
74
- * CocoaLumberjack has several useful macros and functions.
75
- * If not using Lumberjack, we re-define these macros for our own use.
76
- **/
77
-
78
- #if YapDatabaseLoggingTechnique != YapDatabaseLoggingTechnique_Lumberjack
79
-
80
- #ifndef THIS_METHOD
81
- #define THIS_METHOD NSStringFromSelector(_cmd)
82
- #endif
83
-
84
- #ifndef THIS_FILE
85
- NSString *YDBExtractFileNameWithoutExtension(const char *filePath);
86
- #define THIS_FILE (YDBExtractFileNameWithoutExtension(__FILE__))
87
- #endif
88
-
89
- #endif
90
-
91
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
92
- #if (YapDatabaseLoggingTechnique == YapDatabaseLoggingTechnique_Lumberjack)
93
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
94
-
95
- // Logging Enabled.
96
- // Logging uses the CocoaLumberjack framework. (optimal)
97
- //
98
- // There is a TON of documentation available from the project page:
99
- // https://github.com/robbiehanson/CocoaLumberjack
100
-
101
- #import "DDLog.h"
102
-
103
- #define YDBLogAsync NO
104
- #define YDBLogContext 27017
105
-
106
- #define YDBLogMaybe(flg, frmt, ...) LOG_OBJC_MAYBE(YDBLogAsync, ydbLogLevel, flg, YDBLogContext, frmt, ##__VA_ARGS__)
107
-
108
- #define YDBLogError(frmt, ...) YDBLogMaybe(YDB_LOG_FLAG_ERROR, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__)
109
- #define YDBLogWarn(frmt, ...) YDBLogMaybe(YDB_LOG_FLAG_WARN, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__)
110
- #define YDBLogInfo(frmt, ...) YDBLogMaybe(YDB_LOG_FLAG_INFO, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__)
111
- #define YDBLogVerbose(frmt, ...) YDBLogMaybe(YDB_LOG_FLAG_VERBOSE, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__)
112
-
113
- #define YDBLogTrace(frmt, ...) YDBLogMaybe(YDB_LOG_FLAG_TRACE, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__)
114
- #define YDBLogAutoTrace() YDBLogMaybe(YDB_LOG_FLAG_TRACE, @"%@: %@", THIS_FILE, THIS_METHOD)
115
-
116
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
117
- #elif (YapDatabaseLoggingTechnique == YapDatabaseLoggingTechnique_NSLog)
118
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
119
-
120
- // Logging Enabled.
121
- // Logging uses plain old NSLog. (slower)
122
-
123
- #define YDBLogMaybe(flg, frmt, ...) \
124
- do{ if(ydbLogLevel & flg) NSLog((@"%@: " frmt), THIS_FILE, ##__VA_ARGS__); } while(0)
125
-
126
- #define YDBLogError(frmt, ...) YDBLogMaybe(YDB_LOG_FLAG_ERROR, frmt, ##__VA_ARGS__)
127
- #define YDBLogWarn(frmt, ...) YDBLogMaybe(YDB_LOG_FLAG_WARN, frmt, ##__VA_ARGS__)
128
- #define YDBLogInfo(frmt, ...) YDBLogMaybe(YDB_LOG_FLAG_INFO, frmt, ##__VA_ARGS__)
129
- #define YDBLogVerbose(frmt, ...) YDBLogMaybe(YDB_LOG_FLAG_VERBOSE, frmt, ##__VA_ARGS__)
130
-
131
- #define YDBLogTrace(frmt, ...) YDBLogMaybe(YDB_LOG_FLAG_TRACE, (@"%@: " frmt), THIS_FILE, ##__VA_ARGS__)
132
- #define YDBLogAutoTrace() YDBLogMaybe(YDB_LOG_FLAG_TRACE, @"%@: %@", THIS_FILE, THIS_METHOD)
133
-
134
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
135
- #else
136
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
137
-
138
- // Logging Disabled
139
-
140
- #undef YDB_LOG_ERROR
141
- #undef YDB_LOG_WARN
142
- #undef YDB_LOG_INFO
143
- #undef YDB_LOG_VERBOSE
144
-
145
- #define YDB_LOG_ERROR (NO)
146
- #define YDB_LOG_WARN (NO)
147
- #define YDB_LOG_INFO (NO)
148
- #define YDB_LOG_VERBOSE (NO)
149
-
150
- #define YDBLogError(frmt, ...) {}
151
- #define YDBLogWarn(frmt, ...) {}
152
- #define YDBLogInfo(frmt, ...) {}
153
- #define YDBLogVerbose(frmt, ...) {}
154
-
155
- #define YDBLogTrace(frmt, ...) {}
156
- #define YDBLogAutoTrace() {}
157
-
158
- #endif
@@ -1,17 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
-
3
- /**
4
- * There should only be one YapDatabase or YapCollectionDatabase per file.
5
- *
6
- * The architecture design is to create a single parent database instance,
7
- * and then spawn connections to the database as needed from the parent.
8
- *
9
- * The architecture is built around this restriction, and is dependent upon it for proper operation.
10
- * This class simply helps maintain this requirement.
11
- **/
12
- @interface YapDatabaseManager : NSObject
13
-
14
- + (BOOL)registerDatabaseForPath:(NSString *)path;
15
- + (void)deregisterDatabaseForPath:(NSString *)path;
16
-
17
- @end
@@ -1,446 +0,0 @@
1
- #import <Foundation/Foundation.h>
2
-
3
- #import "YapDatabase.h"
4
- #import "YapDatabaseDefaults.h"
5
- #import "YapDatabaseConnection.h"
6
- #import "YapDatabaseTransaction.h"
7
- #import "YapDatabaseExtension.h"
8
-
9
- #import "YapCache.h"
10
- #import "YapMemoryTable.h"
11
- #import "YapCollectionKey.h"
12
-
13
- #import "sqlite3.h"
14
-
15
- /**
16
- * Helper method to conditionally invoke sqlite3_finalize on a statement, and then set the ivar to NULL.
17
- **/
18
- NS_INLINE void sqlite_finalize_null(sqlite3_stmt **stmtPtr)
19
- {
20
- if (*stmtPtr) {
21
- sqlite3_finalize(*stmtPtr);
22
- *stmtPtr = NULL;
23
- }
24
- }
25
-
26
- extern NSString *const YapDatabaseRegisteredExtensionsKey;
27
- extern NSString *const YapDatabaseRegisteredTablesKey;
28
- extern NSString *const YapDatabaseExtensionsOrderKey;
29
- extern NSString *const YapDatabaseExtensionDependenciesKey;
30
- extern NSString *const YapDatabaseRemovedRowidsKey;
31
- extern NSString *const YapDatabaseNotificationKey;
32
-
33
- @interface YapDatabase () {
34
- @private
35
-
36
- NSMutableArray *changesets;
37
- uint64_t snapshot;
38
-
39
- dispatch_queue_t internalQueue;
40
- dispatch_queue_t checkpointQueue;
41
-
42
- YapDatabaseDefaults *defaults;
43
-
44
- NSDictionary *registeredExtensions;
45
- NSDictionary *registeredTables;
46
-
47
- NSArray *extensionsOrder;
48
- NSDictionary *extensionDependencies;
49
-
50
- YapDatabaseConnection *registrationConnection;
51
-
52
- NSUInteger maxConnectionPoolCount;
53
- NSTimeInterval connectionPoolLifetime;
54
- dispatch_source_t connectionPoolTimer;
55
- NSMutableArray *connectionPoolValues;
56
- NSMutableArray *connectionPoolDates;
57
-
58
- sqlite3 *db; // Used for setup & checkpoints
59
-
60
- @public
61
-
62
- void *IsOnSnapshotQueueKey; // Only to be used by YapDatabaseConnection
63
- void *IsOnWriteQueueKey; // Only to be used by YapDatabaseConnection
64
-
65
- dispatch_queue_t snapshotQueue; // Only to be used by YapDatabaseConnection
66
- dispatch_queue_t writeQueue; // Only to be used by YapDatabaseConnection
67
-
68
- NSMutableArray *connectionStates; // Only to be used by YapDatabaseConnection
69
-
70
- NSArray *previouslyRegisteredExtensionNames; // Only to be used by YapDatabaseConnection
71
-
72
- YapDatabaseSerializer objectSerializer; // Read-only by transactions
73
- YapDatabaseDeserializer objectDeserializer; // Read-only by transactions
74
-
75
- YapDatabaseSerializer metadataSerializer; // Read-only by transactions
76
- YapDatabaseDeserializer metadataDeserializer; // Read-only by transactions
77
-
78
- YapDatabaseSanitizer objectSanitizer; // Read-only by transactions
79
- YapDatabaseSanitizer metadataSanitizer; // Read-only by transactions
80
- }
81
-
82
- /**
83
- * General utility methods.
84
- **/
85
- - (BOOL)tableExists:(NSString *)tableName using:(sqlite3 *)aDb;
86
- - (NSArray *)columnNamesForTable:(NSString *)tableName using:(sqlite3 *)aDb;
87
- - (NSDictionary *)columnNamesAndAffinityForTable:(NSString *)tableName using:(sqlite3 *)aDb;
88
-
89
- /**
90
- * New connections inherit their default values from this structure.
91
- **/
92
- - (YapDatabaseDefaults *)defaults;
93
-
94
- /**
95
- * Called from YapDatabaseConnection's dealloc method to remove connection's state from connectionStates array.
96
- **/
97
- - (void)removeConnection:(YapDatabaseConnection *)connection;
98
-
99
- /**
100
- * YapDatabaseConnection uses these methods to recycle sqlite3 instances using the connection pool.
101
- **/
102
- - (BOOL)connectionPoolEnqueue:(sqlite3 *)aDb;
103
- - (sqlite3 *)connectionPoolDequeue;
104
-
105
- /**
106
- * These methods are only accessible from within the snapshotQueue.
107
- * Used by [YapDatabaseConnection prepare].
108
- **/
109
- - (NSDictionary *)registeredTables;
110
- - (NSArray *)extensionsOrder;
111
- - (NSDictionary *)extensionDependencies;
112
-
113
- /**
114
- * This method is only accessible from within the snapshotQueue.
115
- *
116
- * Prior to starting the sqlite commit, the connection must report its changeset to the database.
117
- * The database will store the changeset, and provide it to other connections if needed (due to a race condition).
118
- *
119
- * The following MUST be in the dictionary:
120
- *
121
- * - snapshot : NSNumber with the changeset's snapshot
122
- **/
123
- - (void)notePendingChanges:(NSDictionary *)changeset fromConnection:(YapDatabaseConnection *)connection;
124
-
125
- /**
126
- * This method is only accessible from within the snapshotQueue.
127
- *
128
- * This method is used if a transaction finds itself in a race condition.
129
- * That is, the transaction started before it was able to process changesets from sibling connections.
130
- *
131
- * It should fetch the changesets needed and then process them via [connection noteCommittedChanges:].
132
- **/
133
- - (NSArray *)pendingAndCommittedChangesSince:(uint64_t)connectionSnapshot until:(uint64_t)maxSnapshot;
134
-
135
- /**
136
- * This method is only accessible from within the snapshotQueue.
137
- *
138
- * Upon completion of a readwrite transaction, the connection must report its changeset to the database.
139
- * The database will then forward the changeset to all other connections.
140
- *
141
- * The following MUST be in the dictionary:
142
- *
143
- * - snapshot : NSNumber with the changeset's snapshot
144
- **/
145
- - (void)noteCommittedChanges:(NSDictionary *)changeset fromConnection:(YapDatabaseConnection *)connection;
146
-
147
- /**
148
- * This method should be called whenever the maximum checkpointable snapshot is incremented.
149
- * That is, the state of every connection is known to the system.
150
- * And a snaphot cannot be checkpointed until every connection is at or past that snapshot.
151
- * Thus, we can know the point at which a snapshot becomes checkpointable,
152
- * and we can thus optimize the checkpoint invocations such that
153
- * each invocation is able to checkpoint one or more commits.
154
- **/
155
- - (void)asyncCheckpoint:(uint64_t)maxCheckpointableSnapshot;
156
-
157
- @end
158
-
159
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
160
- #pragma mark -
161
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
162
-
163
- @interface YapDatabaseConnection () {
164
- @private
165
- uint64_t snapshot;
166
-
167
- id sharedKeySetForInternalChangeset;
168
- id sharedKeySetForExternalChangeset;
169
-
170
- YapDatabaseReadTransaction *longLivedReadTransaction;
171
- BOOL throwExceptionsForImplicitlyEndingLongLivedReadTransaction;
172
- NSMutableArray *pendingChangesets;
173
- NSMutableArray *processedChangesets;
174
-
175
- NSDictionary *registeredExtensions;
176
- BOOL registeredExtensionsChanged;
177
-
178
- NSDictionary *registeredTables;
179
- BOOL registeredTablesChanged;
180
-
181
- NSMutableDictionary *extensions;
182
- BOOL extensionsReady;
183
- id sharedKeySetForExtensions;
184
-
185
- @public
186
- __strong YapDatabase *database;
187
-
188
- sqlite3 *db;
189
-
190
- dispatch_queue_t connectionQueue; // For YapDatabaseExtensionConnection subclasses
191
- void *IsOnConnectionQueueKey; // For YapDatabaseExtensionConnection subclasses
192
-
193
- NSArray *extensionsOrder; // Read-only by YapDatabaseTransaction
194
- NSDictionary *extensionDependencies; // Read-only for YapDatabaseExtensionTransaction subclasses
195
-
196
- BOOL hasDiskChanges;
197
-
198
- YapCache *keyCache;
199
- YapCache *objectCache;
200
- YapCache *metadataCache;
201
-
202
- NSUInteger objectCacheLimit; // Read-only by transaction. Use as consideration of whether to add to cache.
203
- NSUInteger metadataCacheLimit; // Read-only by transaction. Use as consideration of whether to add to cache.
204
-
205
- YapDatabasePolicy objectPolicy; // Read-only by transaction. Use to determine what goes in objectChanges.
206
- YapDatabasePolicy metadataPolicy; // Read-only by transaction. Use to determine what goes in metadataChanges.
207
-
208
- BOOL needsMarkSqlLevelSharedReadLock; // Read-only by transaction. Use as consideration of whether to invoke method.
209
-
210
- NSMutableDictionary *objectChanges;
211
- NSMutableDictionary *metadataChanges;
212
- NSMutableSet *removedKeys;
213
- NSMutableSet *removedCollections;
214
- NSMutableSet *removedRowids;
215
- BOOL allKeysRemoved;
216
- }
217
-
218
- - (id)initWithDatabase:(YapDatabase *)database;
219
-
220
- - (sqlite3_stmt *)beginTransactionStatement;
221
- - (sqlite3_stmt *)commitTransactionStatement;
222
- - (sqlite3_stmt *)rollbackTransactionStatement;
223
-
224
- - (sqlite3_stmt *)yapGetDataForKeyStatement; // Against "yap" database, for internal use
225
- - (sqlite3_stmt *)yapSetDataForKeyStatement; // Against "yap" database, for internal use
226
- - (sqlite3_stmt *)yapRemoveForKeyStatement; // Against "yap" database, for internal use
227
- - (sqlite3_stmt *)yapRemoveExtensionStatement; // Against "yap" database, for internal use
228
-
229
- - (sqlite3_stmt *)getCollectionCountStatement;
230
- - (sqlite3_stmt *)getKeyCountForCollectionStatement;
231
- - (sqlite3_stmt *)getKeyCountForAllStatement;
232
- - (sqlite3_stmt *)getCountForRowidStatement;
233
- - (sqlite3_stmt *)getRowidForKeyStatement;
234
- - (sqlite3_stmt *)getKeyForRowidStatement;
235
- - (sqlite3_stmt *)getDataForRowidStatement;
236
- - (sqlite3_stmt *)getMetadataForRowidStatement;
237
- - (sqlite3_stmt *)getAllForRowidStatement;
238
- - (sqlite3_stmt *)getDataForKeyStatement;
239
- - (sqlite3_stmt *)getMetadataForKeyStatement;
240
- - (sqlite3_stmt *)getAllForKeyStatement;
241
- - (sqlite3_stmt *)insertForRowidStatement;
242
- - (sqlite3_stmt *)updateAllForRowidStatement;
243
- - (sqlite3_stmt *)updateObjectForRowidStatement;
244
- - (sqlite3_stmt *)updateMetadataForRowidStatement;
245
- - (sqlite3_stmt *)removeForRowidStatement;
246
- - (sqlite3_stmt *)removeCollectionStatement;
247
- - (sqlite3_stmt *)removeAllStatement;
248
- - (sqlite3_stmt *)enumerateCollectionsStatement;
249
- - (sqlite3_stmt *)enumerateCollectionsForKeyStatement;
250
- - (sqlite3_stmt *)enumerateKeysInCollectionStatement;
251
- - (sqlite3_stmt *)enumerateKeysInAllCollectionsStatement;
252
- - (sqlite3_stmt *)enumerateKeysAndMetadataInCollectionStatement;
253
- - (sqlite3_stmt *)enumerateKeysAndMetadataInAllCollectionsStatement;
254
- - (sqlite3_stmt *)enumerateKeysAndObjectsInCollectionStatement;
255
- - (sqlite3_stmt *)enumerateKeysAndObjectsInAllCollectionsStatement;
256
- - (sqlite3_stmt *)enumerateRowsInCollectionStatement;
257
- - (sqlite3_stmt *)enumerateRowsInAllCollectionsStatement;
258
-
259
- - (void)prepare;
260
-
261
- - (NSDictionary *)extensions;
262
-
263
- - (BOOL)registerExtension:(YapDatabaseExtension *)extension withName:(NSString *)extensionName;
264
- - (void)unregisterExtension:(NSString *)extensionName;
265
-
266
- - (NSDictionary *)registeredTables;
267
-
268
- - (BOOL)registerTable:(YapMemoryTable *)table withName:(NSString *)name;
269
- - (void)unregisterTableWithName:(NSString *)name;
270
-
271
- - (YapDatabaseReadTransaction *)newReadTransaction;
272
- - (YapDatabaseReadWriteTransaction *)newReadWriteTransaction;
273
-
274
- - (void)markSqlLevelSharedReadLockAcquired;
275
-
276
- - (void)postRollbackCleanup;
277
-
278
- - (NSArray *)internalChangesetKeys;
279
- - (NSArray *)externalChangesetKeys;
280
- - (void)getInternalChangeset:(NSMutableDictionary **)internalPtr externalChangeset:(NSMutableDictionary **)externalPtr;
281
- - (void)processChangeset:(NSDictionary *)changeset;
282
-
283
- - (void)noteCommittedChanges:(NSDictionary *)changeset;
284
-
285
- - (void)maybeResetLongLivedReadTransaction;
286
-
287
- @end
288
-
289
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
290
- #pragma mark -
291
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
292
-
293
- @interface YapDatabaseReadTransaction () {
294
- @private
295
-
296
- NSMutableDictionary *extensions;
297
- NSMutableArray *orderedExtensions;
298
- BOOL extensionsReady;
299
-
300
- @protected
301
- BOOL isMutated; // Used for "mutation during enumeration" protection
302
-
303
- @public
304
- __unsafe_unretained YapDatabaseConnection *connection;
305
-
306
- BOOL isReadWriteTransaction;
307
- BOOL rollback;
308
- id customObjectForNotification;
309
- }
310
-
311
- - (id)initWithConnection:(YapDatabaseConnection *)connection isReadWriteTransaction:(BOOL)flag;
312
-
313
- - (void)beginTransaction;
314
- - (void)preCommitReadWriteTransaction;
315
- - (void)commitTransaction;
316
- - (void)rollbackTransaction;
317
-
318
- - (NSDictionary *)extensions;
319
- - (NSArray *)orderedExtensions;
320
-
321
- - (YapMemoryTableTransaction *)memoryTableTransaction:(NSString *)tableName;
322
-
323
- - (void)addRegisteredExtensionTransaction:(YapDatabaseExtensionTransaction *)extTransaction;
324
- - (void)removeRegisteredExtensionTransaction:(NSString *)extName;
325
-
326
-
327
- - (BOOL)getBoolValue:(BOOL *)valuePtr forKey:(NSString *)key extension:(NSString *)extensionName;
328
- - (void)setBoolValue:(BOOL)value forKey:(NSString *)key extension:(NSString *)extensionName;
329
-
330
- - (BOOL)getIntValue:(int *)valuePtr forKey:(NSString *)key extension:(NSString *)extensionName;
331
- - (void)setIntValue:(int)value forKey:(NSString *)key extension:(NSString *)extensionName;
332
-
333
- - (BOOL)getDoubleValue:(double *)valuePtr forKey:(NSString *)key extension:(NSString *)extensionName;
334
- - (void)setDoubleValue:(double)value forKey:(NSString *)key extension:(NSString *)extensionName;
335
-
336
- - (NSString *)stringValueForKey:(NSString *)key extension:(NSString *)extensionName;
337
- - (void)setStringValue:(NSString *)value forKey:(NSString *)key extension:(NSString *)extensionName;
338
-
339
- - (NSData *)dataValueForKey:(NSString *)key extension:(NSString *)extensionName;
340
- - (void)setDataValue:(NSData *)value forKey:(NSString *)key extension:(NSString *)extensionName;
341
-
342
- - (void)removeValueForKey:(NSString *)key extension:(NSString *)extensionName;
343
- - (void)removeAllValuesForExtension:(NSString *)extensionName;
344
-
345
- - (NSException *)mutationDuringEnumerationException;
346
-
347
- - (BOOL)getRowid:(int64_t *)rowidPtr forKey:(NSString *)key inCollection:(NSString *)collection;
348
-
349
- - (YapCollectionKey *)collectionKeyForRowid:(int64_t)rowid;
350
-
351
- - (BOOL)getCollectionKey:(YapCollectionKey **)collectionKeyPtr object:(id *)objectPtr forRowid:(int64_t)rowid;
352
- - (BOOL)getCollectionKey:(YapCollectionKey **)collectionKeyPtr metadata:(id *)metadataPtr forRowid:(int64_t)rowid;
353
-
354
- - (BOOL)getCollectionKey:(YapCollectionKey **)collectionKeyPtr
355
- object:(id *)objectPtr
356
- metadata:(id *)metadataPtr
357
- forRowid:(int64_t)rowid;
358
-
359
- - (BOOL)hasRowid:(int64_t)rowid;
360
-
361
- - (id)objectForKey:(NSString *)key inCollection:(NSString *)collection withRowid:(int64_t)rowid;
362
- - (id)objectForCollectionKey:(YapCollectionKey *)cacheKey withRowid:(int64_t)rowid;
363
-
364
- - (id)metadataForKey:(NSString *)key inCollection:(NSString *)collection withRowid:(int64_t)rowid;
365
- - (id)metadataForCollectionKey:(YapCollectionKey *)cacheKey withRowid:(int64_t)rowid;
366
-
367
- - (void)_enumerateKeysInCollection:(NSString *)collection
368
- usingBlock:(void (^)(int64_t rowid, NSString *key, BOOL *stop))block;
369
-
370
- - (void)_enumerateKeysInCollections:(NSArray *)collections
371
- usingBlock:(void (^)(int64_t rowid, NSString *collection, NSString *key, BOOL *stop))block;
372
-
373
- - (void)_enumerateKeysInAllCollectionsUsingBlock:
374
- (void (^)(int64_t rowid, NSString *collection, NSString *key, BOOL *stop))block;
375
-
376
- - (void)_enumerateKeysAndMetadataInCollection:(NSString *)collection
377
- usingBlock:(void (^)(int64_t rowid, NSString *key, id metadata, BOOL *stop))block;
378
- - (void)_enumerateKeysAndMetadataInCollection:(NSString *)collection
379
- usingBlock:(void (^)(int64_t rowid, NSString *key, id metadata, BOOL *stop))block
380
- withFilter:(BOOL (^)(int64_t rowid, NSString *key))filter;
381
-
382
- - (void)_enumerateKeysAndMetadataInCollections:(NSArray *)collections
383
- usingBlock:(void (^)(int64_t rowid, NSString *collection, NSString *key, id metadata, BOOL *stop))block;
384
- - (void)_enumerateKeysAndMetadataInCollections:(NSArray *)collections
385
- usingBlock:(void (^)(int64_t rowid, NSString *collection, NSString *key, id metadata, BOOL *stop))block
386
- withFilter:(BOOL (^)(int64_t rowid, NSString *collection, NSString *key))filter;
387
-
388
- - (void)_enumerateKeysAndMetadataInAllCollectionsUsingBlock:
389
- (void (^)(int64_t rowid, NSString *collection, NSString *key, id metadata, BOOL *stop))block;
390
- - (void)_enumerateKeysAndMetadataInAllCollectionsUsingBlock:
391
- (void (^)(int64_t rowid, NSString *collection, NSString *key, id metadata, BOOL *stop))block
392
- withFilter:(BOOL (^)(int64_t rowid, NSString *collection, NSString *key))filter;
393
-
394
- - (void)_enumerateKeysAndObjectsInCollection:(NSString *)collection
395
- usingBlock:(void (^)(int64_t rowid, NSString *key, id object, BOOL *stop))block;
396
- - (void)_enumerateKeysAndObjectsInCollection:(NSString *)collection
397
- usingBlock:(void (^)(int64_t rowid, NSString *key, id object, BOOL *stop))block
398
- withFilter:(BOOL (^)(int64_t rowid, NSString *key))filter;
399
-
400
- - (void)_enumerateKeysAndObjectsInCollections:(NSArray *)collections
401
- usingBlock:(void (^)(int64_t rowid, NSString *collection, NSString *key, id object, BOOL *stop))block;
402
- - (void)_enumerateKeysAndObjectsInCollections:(NSArray *)collections
403
- usingBlock:(void (^)(int64_t rowid, NSString *collection, NSString *key, id object, BOOL *stop))block
404
- withFilter:(BOOL (^)(int64_t rowid, NSString *collection, NSString *key))filter;
405
-
406
- - (void)_enumerateKeysAndObjectsInAllCollectionsUsingBlock:
407
- (void (^)(int64_t rowid, NSString *collection, NSString *key, id object, BOOL *stop))block;
408
- - (void)_enumerateKeysAndObjectsInAllCollectionsUsingBlock:
409
- (void (^)(int64_t rowid, NSString *collection, NSString *key, id object, BOOL *stop))block
410
- withFilter:(BOOL (^)(int64_t rowid, NSString *collection, NSString *key))filter;
411
-
412
- - (void)_enumerateRowsInCollection:(NSString *)collection
413
- usingBlock:(void (^)(int64_t rowid, NSString *key, id object, id metadata, BOOL *stop))block;
414
- - (void)_enumerateRowsInCollection:(NSString *)collection
415
- usingBlock:(void (^)(int64_t rowid, NSString *key, id object, id metadata, BOOL *stop))block
416
- withFilter:(BOOL (^)(int64_t rowid, NSString *key))filter;
417
-
418
- - (void)_enumerateRowsInCollections:(NSArray *)collections
419
- usingBlock:(void (^)(int64_t rowid, NSString *collection, NSString *key, id object, id metadata, BOOL *stop))block;
420
- - (void)_enumerateRowsInCollections:(NSArray *)collections
421
- usingBlock:(void (^)(int64_t rowid, NSString *collection, NSString *key, id object, id metadata, BOOL *stop))block
422
- withFilter:(BOOL (^)(int64_t rowid, NSString *collection, NSString *key))filter;
423
-
424
- - (void)_enumerateRowsInAllCollectionsUsingBlock:
425
- (void (^)(int64_t rowid, NSString *collection, NSString *key, id object, id metadata, BOOL *stop))block;
426
- - (void)_enumerateRowsInAllCollectionsUsingBlock:
427
- (void (^)(int64_t rowid, NSString *collection, NSString *key, id object, id metadata, BOOL *stop))block
428
- withFilter:(BOOL (^)(int64_t rowid, NSString *collection, NSString *key))filter;
429
-
430
- @end
431
-
432
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
433
- #pragma mark -
434
- ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
435
-
436
- @interface YapDatabaseReadWriteTransaction ()
437
-
438
- - (void)replaceObject:(id)object forKey:(NSString *)key inCollection:(NSString *)collection withRowid:(int64_t)rowid;
439
- - (void)replaceMetadata:(id)metadata
440
- forKey:(NSString *)key
441
- inCollection:(NSString *)collection
442
- withRowid:(int64_t)rowid;
443
-
444
- - (void)removeObjectForKey:(NSString *)key inCollection:(NSString *)collection withRowid:(int64_t)rowid;
445
-
446
- @end