     [ [ (ensure-collection) ] keep ] unless
     [ mdb-instance name>> ] dip "%s.%s" sprintf ; inline
 
+: fix-query-collection ( mdb-query -- mdb-query )
+    [ check-collection ] change-collection ; inline
+    
 PRIVATE>
 
 : <query> ( collection query -- mdb-query )


GENERIC: find-one ( mdb-query -- result/f )
M: mdb-query-msg find-one
    1 >>return# send-query-plain objects>>
    dup empty? [ drop f ] [ first ] if ;



GENERIC: find ( mdb-query -- cursor result )
M: mdb-query-msg find
    fix-query-collection send-query ;
M: mdb-cursor find
    get-more ;

