Hi Erik, For now, I'm using checkAndSave in order to make sure that a row is only created but not overwritten by multiple threads. So, checkAndSave is mostly invoked with a new structure created on the client. Actually, I'm checking if a specific "deleted" column in empty. If the "deleted" column is not empty, then the row creation cannot be performed. There are another few tricky cases I'm using it, but I'm sure that making that Result object more difficult to create than putting values on a map would be bad for me. :-)
However, here's an idea. What if Put and Delete objects have a field "condition" (maybe, "onlyIf" would be a better name) which is exactly the map with columns and expected values. So, a given Put or Delete of an updates list will only happen if those expected values match. Also, maybe it should be possible to indicate common expected values for all updates of a list too, so a client won't have to put in all updates the same values if needed. But we must remember to solve the conflicts of expected values. (By the way, I haven't seen the guts of new Puts and Deletes, so I don't know how difficult would it be to implement it -- but I can help, if necessary) Thanks, On Tue, Jun 2, 2009 at 2:34 PM, Erik Holstad <[email protected]> wrote: > Hi! > I'm working on putting checkAndSave back into 0.20 and just want to check > with the people that are using it how they are using it > so that I can make it as good as possible for these users. > > Since the API has changed from earlier versions there are some things that > one need to think about. > For now in the new API there are now Updates, just Put and Delete, so for > now I need to know if users used to delete in the old batchUpdate > or just put? > > The new return format Result might seem like a good way to send in the data > to be used as "actual", but there is no super easy way to build that > on the client side for now, so would be good to know how you are doing > this. > If you do a get, save the result and then use it for the check or if you > just create new structures on the client? > > Regards Erik > -- Guilherme msn: [email protected] homepage: http://germoglio.googlepages.com
