Skip to content

Search by oid #21

@grepz

Description

@grepz

I was trying to find a document in a collection using its oid with(imho) the most obvious way:
(db.find "collection" (kv "_id" (doc-id somedoc)))
But ended up with nothing, so after searching through the sources I've found make-bson-oid function which makes my task possible:
(db.find "collection" (kv "_id" (make-bson-oid :oid oid-vector)))
So I may be missing something or it will be a good idea to change db.find method for the sake of oid search or maybe just export make-bson-oid?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions