-
Notifications
You must be signed in to change notification settings - Fork 109
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
Docs need updating for Exists condition #166
Comments
generates
|
A valid workaround for now is to pass Expected in to the params:
|
This looks like a valid query to me. I'm guessing the problem is that If that's the case, this is a breaking change that DynamoDB and/or aws-sdk made. Can you write a service-level test that fails? |
Currently, the dynogels docs say you can use:
Exists: true
as a param, but specifying this without a Value causes dynamo to throw:ExpressionAttributeValues must not be empty
.Per the AWS docs:
The default setting for Exists is true. If you supply a Value all by itself, DynamoDB assumes the attribute exists: You don't have to set Exists to true, because it is implied.
DynamoDB returns a ValidationException if:
Exists is true but there is no Value to check. (You expect a value to exist, but don't specify what that value is.)
I think we should update the docs to specify this like
{ email: { Value: '[email protected]'} }
.[email protected]
EDIT
Upon looking deeper at this functionality, it seems the similarities of usage of "Exists" are only coincidental. Looks like manual construction vs. using dynamo ExpectedAttributeValue.
Because an empty object of ExpressionAttributeValues is generated, the aws sdk is complaining. Is this potentially only a factor on newer aws sdk versions?
The text was updated successfully, but these errors were encountered: