Merge pull request #213 from okorz001/uuid-representation
Add uuid-representation option
This commit is contained in:
commit
4d8747f9ed
2 changed files with 4 additions and 1 deletions
|
|
@ -145,7 +145,7 @@
|
||||||
max-wait-time min-connections-per-host min-heartbeat-frequency read-concern read-preference
|
max-wait-time min-connections-per-host min-heartbeat-frequency read-concern read-preference
|
||||||
required-replica-set-name retry-writes server-selection-timeout server-selector socket-keep-alive
|
required-replica-set-name retry-writes server-selection-timeout server-selector socket-keep-alive
|
||||||
socket-factory socket-timeout ssl-context ssl-enabled ssl-invalid-host-name-allowed
|
socket-factory socket-timeout ssl-context ssl-enabled ssl-invalid-host-name-allowed
|
||||||
threads-allowed-to-block-for-connection-multiplier write-concern]}]
|
threads-allowed-to-block-for-connection-multiplier uuid-representation write-concern]}]
|
||||||
(let [mob (MongoClientOptions$Builder.)]
|
(let [mob (MongoClientOptions$Builder.)]
|
||||||
(when add-cluster-listener
|
(when add-cluster-listener
|
||||||
(.addClusterListener mob add-cluster-listener))
|
(.addClusterListener mob add-cluster-listener))
|
||||||
|
|
@ -238,6 +238,8 @@
|
||||||
(.sslInvalidHostNameAllowed mob ssl-invalid-host-name-allowed))
|
(.sslInvalidHostNameAllowed mob ssl-invalid-host-name-allowed))
|
||||||
(when threads-allowed-to-block-for-connection-multiplier
|
(when threads-allowed-to-block-for-connection-multiplier
|
||||||
(.threadsAllowedToBlockForConnectionMultiplier mob threads-allowed-to-block-for-connection-multiplier))
|
(.threadsAllowedToBlockForConnectionMultiplier mob threads-allowed-to-block-for-connection-multiplier))
|
||||||
|
(when uuid-representation
|
||||||
|
(.uuidRepresentation mob uuid-representation))
|
||||||
(when write-concern
|
(when write-concern
|
||||||
(.writeConcern mob write-concern))
|
(.writeConcern mob write-concern))
|
||||||
mob))
|
mob))
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@
|
||||||
:ssl-enabled true
|
:ssl-enabled true
|
||||||
:ssl-invalid-host-name-allowed true
|
:ssl-invalid-host-name-allowed true
|
||||||
:threads-allowed-to-block-for-connection-multiplier 1
|
:threads-allowed-to-block-for-connection-multiplier 1
|
||||||
|
:uuid-representation org.bson.UuidRepresentation/STANDARD
|
||||||
:write-concern com.mongodb.WriteConcern/JOURNAL_SAFE}]
|
:write-concern com.mongodb.WriteConcern/JOURNAL_SAFE}]
|
||||||
(is (instance? com.mongodb.MongoClientOptions$Builder (mg/mongo-options-builder opts)))))
|
(is (instance? com.mongodb.MongoClientOptions$Builder (mg/mongo-options-builder opts)))))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue