Accept secondary params whit None #3602
ImanolSantiago
started this conversation in
Polls
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone, I would like to know your opinion.
Basically due to the logic of the application, almost all the Dynamo queries are a scan, because I need the entire tables. This led me to use generators to save memory and also when making the queries I added a small registry system to show some "status".
I ended up centralizing a function that does all of this. Receive table name, project expression, etc. And it takes care of doing the scan, creating the generators, the logs and blah blah blah.
The problem comes when certain queries use parameters that others do not, such as ProjectExpression or ExpressionAttributeNames where these cannot be empty.
This makes me repeat code to make different calls when these parameters are empty or not.
This type of parameters should be able to receive a None "by default" or am I crazy? Is there any explanation why this is so? Does the aws core not allow these things either?
Thanks so much for reading.
Greetings
0 votes ·
Beta Was this translation helpful? Give feedback.
All reactions