-
Notifications
You must be signed in to change notification settings - Fork 107
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
GetItem should use projection expressions #169
Comments
Hmm, good question. I guess it's best to introduce a new type GetItemProjecting, with gipProjectionExpression instead of giAttrs, and keep GetItem as it is. @ozataman - what do you think? I don't expect they will actually remove AttributesToGet anytime soon, so no need to change that. And I'd be happy to receive a pull request for this. |
The only thing to consider about keeping giAttrs is that they cannot be sent over the API together. On the backend, aws will need to combine them into one projection expression and the documentation should reflect that. |
If you make a separate type, that will enforce them not being sent together. Michael Xavier [email protected] schrieb am Mi., 8. Juli 2015 um
|
I'm a bit confused. I thought you were advocating keeping giAttrs and adding a projection field, in which case they must be combined as it would be possible to send both. Are you saying giAttrs should be removed? |
I'm saying: Add a TYPE. Current type: GetItem. New type: GetItemProjecting. Michael Xavier [email protected] schrieb am Mi., 8. Juli 2015
|
According to the documentation, AttributesToGet in GetItem (in aws these are communicated with the
giAttrs
field) are deprecated. I can't find any solid info as to when or if support for this will be removed. They have been replaced by a string field called a projection expression. It looks like those are more powerful, but at their most basic, they can work the same: a list of toplevel attributes.The route I advocate taking here is 2 steps:
giAttrs :: Maybe [Text]
, but behind the scenes to convert that into an unexportedProjectionExpression
type. This could be released as a patch release as no APIs would change.giAttrs
or keep it, add a Monoid instance to ProjectionExpression and mappend them together in the json instance. This would also entail being smart about attribute naming, as attributes with invalid characters in their name have to be put in as variables and referenced with theExpressionAttributeNames
field, which aws should be able to do automatically, which would be great.Thoughts? I'd be willing to do the work here, but item 2 may entail some more thoughtful consideration on your end as to how you want that API to look, whereas 1 can be done at any time with little to no input.
The text was updated successfully, but these errors were encountered: