taoensso / faraday

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

Boolean not supported? #40

Closed Quantisan closed 9 years ago

Quantisan commented 9 years ago

I'm getting a java.lang.Boolean not supported when I try to put-item with a boolean value. It seems that DynamoDB support Boolean as a data type though. Am I missing something or is this yet to be implemented?

If it's the latter, could you point me in the right direction please, then I can submit a patch for it.

ptaoussanis commented 9 years ago

Hi Paul,

Am I missing something or is this yet to be implemented?

I think the Boolean and Null types may have been introduced recently - don't recall seeing them before. Should be pretty easy to if you felt like submitting a patch.

Actually, from that document - the List and Map types seem new too.

could you point me in the right direction please

Sure. There's two fns you'll want to mod: db-val->clj-val and clj-val->db-val.

You'll want to add support for the relevant method/s as per the docs here: http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/

So getNULL, getBOOL, getL, getM + setNULL, setBOOL, setL, setM.

Would be happy to take a patch that added support. Hope that helps, cheers! :-)