Skip to content
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

DynamoDbEnhancedClient: @DynamoDBAutoGeneratedTimestamp support #1920

Closed
millems opened this issue Jun 22, 2020 · 16 comments
Closed

DynamoDbEnhancedClient: @DynamoDBAutoGeneratedTimestamp support #1920

millems opened this issue Jun 22, 2020 · 16 comments
Labels
dynamodb-enhanced feature-request A feature should be added or improved.

Comments

@millems
Copy link
Contributor

millems commented Jun 22, 2020

From #35:

V1 can automatically generate timestamps for newly created or updated records with the @DynamoDBAutoGeneratedTimestamp annotation. This could be added as an extension to V2.

@millems millems added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. dynamodb-enhanced labels Jun 22, 2020
@debora-ito debora-ito removed the needs-triage This issue or PR still needs to be triaged. label Jun 22, 2020
@gakinson
Copy link

gakinson commented Aug 7, 2020

Hello,

Curious what your timeline is on this?

Thank you,
Geoffrey Kinson

@gakinson
Copy link

gakinson commented Aug 7, 2020

Hello,

I created an implementation for this, feel free to modify and integrate into your SDK. Works the same as the v 1.11 DynamoDB Mapper implementation.

https://github.com/gakinson/dyanamodb-enhanced-DynamoDbAutoGeneratedTimestamp-annotation

Thank you,
Geoffrey Kinson

@gakinson
Copy link

Just wanted to add a note on my previous implementation, the Strategy ALWAYS does not work because I was unable to set an update expression on the WriteModification since it only supports the updated item and CONDITIONAL expressions.

Do you plan on supporting update expressions on the WriteModification class?

@bmaizels
Copy link
Contributor

Hi @gakinson , can you explain why you needed to be able to modify the update expression instead of just providing an updated item map with the timestamp set in it? UpdateItem for example will take the updated item and build an update expression from it.

@gakinson
Copy link

Hello @bmaizels ,

I might be wrong about it, but for the strategy CREATE you need to only set the timestamp on the creation of an object which would require an update expression such as "SET CreationTimestamp = if_not_exists(CreationTimestamp, :t)" to only place the value if it does not exist.

If you were to just return the updated item then you would overwrite the original timestamp.

@bmaizels
Copy link
Contributor

@gakinson, Oh right, yes, we need to support if_not_exists , I remember now. Thanks for the reminder! I've refreshed this in our backlog, stay tuned.

@bmaizels
Copy link
Contributor

@gakinson Just to confirm, it's actually CREATE that is broken because that depends on 'if_not_exists', whereas ALWAYS is supposed to overwrite it every time there is an update and should be achievable using the current extension framework?

@gakinson
Copy link

@bmaizels Yes, the CREATE is broken, but the ALWAYS works fine since it is always a replace.

For CREATE, we need to support if_not_exists which falls into an update expression instead of what is currently supported which are conditional expressions.

@vahAAA
Copy link

vahAAA commented Oct 12, 2020

any news on this?

@gfw001
Copy link

gfw001 commented Nov 9, 2020

keep monitoring official support.

@bmaizels
Copy link
Contributor

bmaizels commented Nov 9, 2020

We haven't delivered this annotation yet but I wanted to point out that 'if_not_exists' behavior is now supported as per #2076

@radhag
Copy link

radhag commented Jan 20, 2021

@bmaizels

What is the timeline on delivering this annotation? I think this is a pretty widely used feature.

@RushinNaik
Copy link

Please let us know about the timleline for this. Thanks.

@blindpirate
Copy link

+1

@millems
Copy link
Contributor Author

millems commented Mar 16, 2021

Sorry, I can confirm that this is in our backlog, but we aren't able to commit to a timeline for when it will be released.

dagnir added a commit that referenced this issue Sep 2, 2022
Only sign requests that have HTTPS endpoints
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dynamodb-enhanced feature-request A feature should be added or improved.
Projects
None yet
Development

No branches or pull requests

10 participants