JsonDB icon indicating copy to clipboard operation
JsonDB copied to clipboard

How to implement the update only some properties of change

Open wells1013 opened this issue 8 years ago • 1 comments

How to implement the update only some properties of change

wells1013 avatar Nov 27 '15 06:11 wells1013

The documentation is not clear on that matter :)

From the JDBDatabase you get a JDBCollection, then create a JDBView, then create a JDBQuery from that view.

From a JDBQuery you can

Those methods all take a JDBModifyOperation code block that take the NSMutableDictionary document to be modified, then expect you return options to tell JsonDB what type of modification you want to do

You can see this in action here:

  • https://github.com/pierredavidbelanger/JsonDB/blob/1.0.0/JsonDB-Tests/JsonDB-Tests/UseCaseSpec.m#L60
  • https://github.com/pierredavidbelanger/JsonDB/blob/1.0.0/JsonDB-Tests/JsonDB-Tests/UseCaseSpec.m#L104
  • https://github.com/pierredavidbelanger/JsonDB/blob/1.0.0/JsonDB-Tests/JsonDB-Tests/UseCaseSpec.m#L147

pierredavidbelanger avatar Nov 27 '15 13:11 pierredavidbelanger