You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Empty String and Binary attribute values are allowed. Attribute values of type String and Binary must have a length greater than zero if the attribute is used as a key attribute for a table or index.
This may be a breaking change if "" changes from meaning "no value please ensure deletion during update" to "put an empty value". From Type._dump and String.dynamo_dump it appears that "" gets transformed to None before _dump and then returns actions.wrap(None) (implemented here) which returns NONE_SENTINEL (defined here as a remove action).
There's a question about where key vs non-key constraints are handled. Since load/dump take a context object we could push is_key=True into the context and let the load/dump function sort out validity, or keep it simple and let the caller inspect the returned value and throw exceptions.
Finally, there's probably some complexity around DynamicType and StringSet/BinarySet that need to be figured out.
Some links to provide context around current design decisions and where changes are anticipated:
Announcement here and PutItem reference here
This may be a breaking change if
""
changes from meaning "no value please ensure deletion during update" to "put an empty value". FromType._dump
andString.dynamo_dump
it appears that""
gets transformed toNone
before_dump
and then returnsactions.wrap(None)
(implemented here) which returnsNONE_SENTINEL
(defined here as a remove action).There's a question about where key vs non-key constraints are handled. Since load/dump take a context object we could push
is_key=True
into the context and let the load/dump function sort out validity, or keep it simple and let the caller inspect the returned value and throw exceptions.Finally, there's probably some complexity around
DynamicType
andStringSet
/BinarySet
that need to be figured out.Some links to provide context around current design decisions and where changes are anticipated:
None
Type._dump
,Type._load
String.dynamo_dump
,String.dynamo_load
dynamo_load
,dynamo_dump
methods for string/binary types that handle None/empty)DynamicType
(can't guess ifNone
means empty Binary or empty String, continue to throw?)DynamicType.backing_type_for
does this assumption still hold, or will an empty set need to throw since it's ambiguous? What aboutset(None)
?The text was updated successfully, but these errors were encountered: