guregu / dynamo

expressive DynamoDB library for Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to blank out an attribute value?

FrankDMartinez opened this issue · comments

Hi. I hope everyone is having a great new year so far.

I apologize in advance if this is documented somewhere and I missed it. How do I update a record in such a way as to replace the existing value of a record's attribute with nothing, as if that attribute had no value at all, versus updating only some of a record's attribute values, leaving the rest of the attribute values unchanged?

Thanks in advance.

Hello. Not sure if I 100% understand the question but you can use Update.Remove to delete attributes. Subsequent reads will produce the zero-value (blank) for it.