-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty-set safety #145
Comments
Is that what amazing dunamo db does? Let's say if there's an item with a set with 1 element and later that element is removed. |
this test fails for the @pytest.mark.parametrize("op", [F("set").set(set()), F("set").delete({"a"})])
async def test_empty_set(client: Client, table: TableName, op):
await client.put_item(table, {"h": "h", "r": "r", "set": {"a"}})
await client.update_item(table, {"h": "h", "r": "r"}, op) EDIT: Actually, |
🤔 this gets even more complicated because of |
aiodynamo used to be empty-string-safe when DynamoDB didn't support empty string values. This mercifully got fixed in DynamoDB, but DynamoDB still doesn't accept empty sets (
NS
,SS
,BS
). There's an argument to be made that aiodynamo should handle this automatically, convertingF("some_set").set(set())
toF("some_set").remove()
, possibly with a warning.The text was updated successfully, but these errors were encountered: