fsprojects / FSharp.AWS.DynamoDB

F# wrapper API for AWS DynamoDB
MIT License
58 stars 18 forks source link

Added sparse GSI support #7

Closed samritchie closed 7 years ago

samritchie commented 7 years ago

Addresses #3. This PR modifies KeyAttributeSchema validation to allow wrapper (Nullable/Option) attribute types, and changes the UpdateExpr check to allow modification of non-primary key attributes. I even added tests! šŸŽ‰

@eiriktsarpalis Iā€™d appreciate a once-over/feedback if you have time.

Thanks!

eiriktsarpalis commented 7 years ago

Wow, great work.

I reviewed the code (poorly, just had a look at the diff) and I think I have an identified an issue where supplying an optional HashKey in the presence of a GlobalSecondaryIndex would not result in a error, which it should. If that is just a case of me not understanding the code I wrote one year ago, could you please also add a test the checks for this?

samritchie commented 7 years ago

Thanks @eiriktsarpalis - I added a test. As far as I can tell, mkKAS is only called for GSI Hash Keys - the primary hashes create the schema via setResult on line 169

eiriktsarpalis commented 7 years ago

Thanks. Merged and pushed as version 0.7.0