-
Notifications
You must be signed in to change notification settings - Fork 120
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
Create if not exists #189
Comments
DynamoDB is not an SQL server. Please read some articles about the best approaches with DynamoDB. Option 1: Set the name as HashKey
Using the scan method will be vary ineffective on large tables. It will consume more read capacity. |
Thanks, I'll try the global primary key approach, 'name' was just an example, a have more fields to guarantee the uniqueness. One more question, about attribute -> 'params' in: Query.create(query, params, ... What is it used for? The docs only say...use expressions api to do conditional writes That is why I tried to use 'params' to avoid duplicated rows. |
Oh, just saw the pointed out example in the documentation with conditional create. Just find out that there are no tests for this situation. |
Hi,
I have a simple table:
How to avoid duplicated queries that contain the same 'name'?
I've tried the following code:
But, duplicated queries have been created.
Is there a way to do it using 'create'?
Thanks
The text was updated successfully, but these errors were encountered: