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

Support ConsistentRead option #370

Closed
harlowk opened this issue Apr 3, 2024 · 3 comments
Closed

Support ConsistentRead option #370

harlowk opened this issue Apr 3, 2024 · 3 comments

Comments

@harlowk
Copy link

harlowk commented Apr 3, 2024

ConsistentRead
Determines the read consistency model: If set to true, then the operation uses strongly consistent reads; otherwise, the operation uses eventually consistent reads.

Request to add consistentRead as an input option to gofor GET requests.

Expected:

	const { data: payment } = await PaymentSource.get({id:'xxx'}).go({
            consistentRead: true
	}); 
	
	// operation uses strongly consistent reads

I'll open an MR for this if I can find time.

@tywalch
Copy link
Owner

tywalch commented Apr 3, 2024

Yo! So there isn't a consistentRead option but you can use

entity.get({...})
    .go({ 
        params: {
            ConsistentRead: true
        }
    });

The params option is a sort of "escape hatch" to put properties directly onto the ddb parameters sent off 💪

@tywalch
Copy link
Owner

tywalch commented Apr 3, 2024

Oh, I'm dumb, I see now this is a request to add this option, not that it "doesn't work". I can add it 👍

@harlowk
Copy link
Author

harlowk commented Jul 23, 2024

Oh, I'm dumb, I see now this is a request to add this option, not that it "doesn't work". I can add it 👍

Ha no, it was more the latter - forgot the params object took those untyped params!

@harlowk harlowk closed this as completed Jul 23, 2024
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

2 participants