taoensso / faraday

Amazon DynamoDB client for Clojure
https://www.taoensso.com/faraday
Eclipse Public License 1.0
238 stars 84 forks source link

Support empty strings #149

Closed smithtim closed 3 years ago

smithtim commented 3 years ago

As of May 2020, DynamoDB supports empty strings: https://aws.amazon.com/about-aws/whats-new/2020/05/amazon-dynamodb-now-supports-empty-values-for-non-key-string-and-binary-attributes-in-dynamodb-tables/

Can we now allow them in faraday? Currently it fails with Invalid DynamoDB value: "" (empty string).

kipz commented 3 years ago

Thanks for the report @smithtim

I think it makes sense to add support for this. Is this something you'd be interested in contributing yourself?

joelittlejohn commented 3 years ago

A thought about this: there are areas where empty strings are still not allowed, but I think we should avoid trying to identify these inside Faraday and just allow DynamoDB to throw an exception if these rules are broken. It seems safer to do this rather than get smart around whether an empty string should be allowed or not and in what context based on table metadata.

smithtim commented 3 years ago

Okay, I've made a PR: #150

joelittlejohn commented 3 years ago

Fixed by #150