dynamoid icon indicating copy to clipboard operation
dynamoid copied to clipboard

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

Open namdv-1375 opened this issue 1 year ago • 7 comments

[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

namdv-1375 avatar Jun 21 '24 01:06 namdv-1375

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?

ckhsponge avatar Jun 21 '24 02:06 ckhsponge

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

namdv-1375 avatar Jun 21 '24 02:06 namdv-1375

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

namdv-1375 avatar Jun 21 '24 02:06 namdv-1375

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.

ckhsponge avatar Jun 21 '24 03:06 ckhsponge

@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.

andrykonchin avatar Jun 21 '24 21:06 andrykonchin

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

Happy Friday!

markprovan avatar Aug 09 '24 14:08 markprovan

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

andrykonchin avatar Aug 18 '24 13:08 andrykonchin

This is released in v3.11.0

andrykonchin avatar Jan 12 '25 20:01 andrykonchin