Open haseebnqureshi opened 7 years ago
This gets more interesting when you're not hashing a random UUID, but instead a username, password, or any other field.
Probably want to dynamically set the main hash, and then run find or create against that one parameter.
Best way to accomplish this is with ExpressionAttributeValues and ConditionExpression:
ExpressionAttributeValues: {
:email
: item.email
},
ConditionExpression: "Email = :email"
This isn't critical right now for 0.3.0; currently recommend users query, then handle conditional create in handler.
By default, let's assume users will only want items with similar or the same properties, only once. We should have a data modeling method that only creates that item once.
We'll need to allow options to user to select which key/values they'd want to atomize their items.