mongo-options-builder does not support uuidRepresentation option
okorz001 opened this issue · 3 comments
okorz001 commented
uuidRepresentation
option was added in 3.12.0. This allows changing the UUID codec implementation -- particularly it allows a client to use a standard UUID codec instead of the legacy Java codec which may be incompatible with other drivers.
The uuidRepresentation
option takes a UuidRepresentation
enum, which is annoying (but trivial) to deal with. It would be nice if we could pass a string or preferably a keyword instead.
As a workaround, I am using the following wrapper. I was too lazy to support a keyword.
(defn- mongo-options
[opts]
(let [mob (monger/mongo-options-builder opts)
{:keys [uuid-representation]} opts]
(when uuid-representation
(.uuidRepresentation mob (UuidRepresentation/valueOf uuid-representation)))
(.build mob)))
okorz001 commented
I see master actually uses 3.12 already so I could submit a patch for this. Are there any plans to do a 3.6.0 release?
michaelklishin commented
@okorz001 a new release should not take long.
okorz001 commented
Thanks for the quick response!