Allow object-id to convert string to object-id
This commit is contained in:
parent
0312ecd2f6
commit
00dad8d0fb
1 changed files with 5 additions and 3 deletions
|
|
@ -30,9 +30,11 @@
|
|||
(.toString (new BigInteger n (SecureRandom.)) num-base))
|
||||
|
||||
(defn ^ObjectId object-id
|
||||
"Returns a new BSON object id"
|
||||
[]
|
||||
(ObjectId.))
|
||||
"Returns a new BSON object id, or converts str to BSON object id"
|
||||
([]
|
||||
(ObjectId.))
|
||||
([s]
|
||||
(ObjectId. s)))
|
||||
|
||||
(defprotocol GetDocumentId
|
||||
(get-id [input] "Returns document id"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue