pghstore-clj icon indicating copy to clipboard operation
pghstore-clj copied to clipboard

Allow nil values

Open sparkertime opened this issue 12 years ago • 3 comments

Right now, to-hstore and from-hstore can only be called on non-nil values. It's a bit annoying to have to nil-check the value before calling the methods - what would you say to a patch to extends the *Storable types for nil?

sparkertime avatar Nov 08 '12 20:11 sparkertime

What would nil store as? Empty string? Can the hstore value be null?

blakesmith avatar Nov 14 '12 19:11 blakesmith

Yeah, I would think that (to-pghstore nil) -> nil. They can indeed be null.

sparkertime avatar Nov 14 '12 19:11 sparkertime

Cool, I'd definitely take a patch for this.

blakesmith avatar Nov 14 '12 19:11 blakesmith