-
Notifications
You must be signed in to change notification settings - Fork 52
Issue #344: Add basic Set support (ADD and DELETE operations) #363
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
base: develop
Are you sure you want to change the base?
Issue #344: Add basic Set support (ADD and DELETE operations) #363
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andygonzalez2010
Please add tests
); | ||
} | ||
}); | ||
// THIS CHECK IS NOT NEEDED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From memory the reason this check was here was due to DynamoDB itself didn't support declaring multiple condition on same attribute within a expression..
With your below example... it would have created an incorrect query expression that would fail when executing against DynamoDB.
Not sure if this has changed since the time it was implemented. Would love to see some references proving this is now supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im currently running this raw :
TransactWriteItems{
"TransactItems": [
{
"Update": {
"TableName": "test",
"Key": {
"PK": {
"S": "UserId#111"
},
"SK": {
"S": "RUNNING_TASKS"
}
},
"ExpressionAttributeNames": {
"#runningTaskIds": "runningTaskIds"
},
"ExpressionAttributeValues": {
":runningTaskIds": {
"SS": ["12", "34"]
},
":zero": {
"N": "0"
}
},
"ConditionExpression":
"attribute_not_exists(#runningTaskIds) OR size(#runningTaskIds) = :zero",
"UpdateExpression": "ADD #runningTaskIds :runningTaskIds"
}
}
]
}
packages/core/src/classes/expression/expression-input-parser.ts
Outdated
Show resolved
Hide resolved
@whimzyLive anything else needed here? can we rerun the automated checks? |
#344