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

Why do I call Dynamoid::TransactionWrite and get an error name uninitialized constant? #763

Open
namdv-1375 opened this issue Jun 21, 2024 · 7 comments

Comments

@namdv-1375
Copy link

[1] pry(main)> Dynamoid::TransactionWrite 
NameError: uninitialized constant Dynamoid::TransactionWrite
from (pry):1:in `__pry__'

Why do I call Dynamoid::TransactionWrite and get an error name uninitialized constant?
Please help me, thankssss <3

@ckhsponge
Copy link
Contributor

I thought I remembered the first version of TransactionWrite being released in 3.10 but I don't see it there. It's in main so you can put this in your gemfile:
gem 'dynamoid', git: 'https://github.com/Dynamoid/dynamoid.git'

This branch has some more documentation about some hidden features but won't be live until the non-transaction actions catch up:
gem 'dynamoid', git: 'https://github.com/ckhsponge/dynamoid.git', branch: 'transact-update'

@andrykonchin Want to release transactions some time?

@namdv-1375
Copy link
Author

gem 'dynamoid', git: 'https://github.com/Dynamoid/dynamoid.git' -> works for me
Thanksssss <3

@namdv-1375
Copy link
Author

@ckhsponge Let me ask, if I want to delete_all with Dynamoid::TransactionWrite, is there any way?

@ckhsponge
Copy link
Contributor

No. I believe in DynamoDB deletions can only occur individually, in a batch or in a transaction and always require primary keys. Dynamoid's delete_all probably gets keys and deletes in batches and this wouldn't be possible in a transaction.

@andrykonchin
Copy link
Member

@ckhsponge Yeah, the next version with transactions support should be released soon. I have some ideas how to polish new tests and wanted to close some minor issues.

@markprovan
Copy link

@andrykonchin Is there any plan for when the next release will take shape?

Happy Friday!

@andrykonchin
Copy link
Member

Yeah, I am going to spent some time soon to polish recent changes and prepare the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants