     [ >>collection ] dip
     >>objects OP_Insert >>opcode ;
 
+: <mdb-update-msg> ( collection object -- mdb-update-msg )
+    [ mdb-update-msg new ] 2dip
+    [ >>collection ] dip
+    [ [ "_id" ] dip at "_id" H{ } clone [ set-at ] keep >>selector ] keep
+    >>object OP_Update >>opcode ;
+    
 : <mdb-reply-msg> ( -- mdb-reply-msg )
     mdb-reply-msg new ; inline
 

       objects>> [ assoc>array write ] each
    ] (write-message) ;

M: mdb-delete-msg write-message ( message -- )
    dup
    '[ _

PREDICATE: mdb-reply-op < integer OP_Reply = ;
PREDICATE: mdb-query-op < integer OP_Query = ;
PREDICATE: mdb-insert-op < integer OP_Insert = ;
PREDICATE: mdb-update-op < integer OP_Update = ;
PREDICATE: mdb-delete-op < integer OP_Delete = ;
PREDICATE: mdb-getmore-op < integer OP_GetMore = ;
PREDICATE: mdb-killcursors-op < integer OP_KillCursors = ;
