Replace=True clarification w/r to List values

4 views
Skip to first unread message

Darren Govoni

unread,
Apr 26, 2011, 2:21:16 PM4/26/11
to boto-...@googlegroups.com
Hi,
I'm using boto 2.04b and need some clarification of how boto treats
replace=True with respect to list values.

I am comparing two SimpleDB implementations, AWS and M/DB.

I get different results with the same boto code.

The issue is when an attribute is being set to/replaced with a list of
values.

boto+SimpleDB will overwrite the attribute old list with the new list.
boto+M/DB will replace the attribute with only the 'last' value of the
list, leaving only a single value.

The author of M/DB can't find an inconsistency with respect to SimpleDB
documented behavior.


So what is the correct behavior/expected behavior with respect to lists?
Its odd that it returns different results with the same code.

Darren


Chris Moyer

unread,
Apr 27, 2011, 8:14:37 AM4/27/11
to boto-...@googlegroups.com
The SimpleDB implementation is the correct one. When it's updating a
list with replace=True, it should wipe out the old values and replace
them with ALL of the new values, not just the last one. Not sure what
the difference is that M/DB has but I don't know of any special
handling case that we do for SDB that would be different for M/DB.

> --
> You received this message because you are subscribed to the Google Groups "boto-users" group.
> To post to this group, send email to boto-...@googlegroups.com.
> To unsubscribe from this group, send email to boto-users+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/boto-users?hl=en.
>
>

--
Chris Moyer

Darren Govoni

unread,
Apr 27, 2011, 8:34:00 AM4/27/11
to boto-...@googlegroups.com
Thanks for the clarification Chris.
Reply all
Reply to author
Forward
0 new messages