 { objects sequence } ;
 
 
-: <mdb-getmore-msg> ( collection return# -- mdb-getmore-msg )
-    [ mdb-getmore-msg new ] 2dip
-    [ >>collection ] dip
-    >>return# OP_GetMore >>opcode ; inline
-
-: <mdb-delete-msg> ( collection assoc -- mdb-delete-msg )
-    [ mdb-delete-msg new ] 2dip
-    [ >>collection ] dip
-    >>selector OP_Delete >>opcode ; inline
-
-: <mdb-query-msg> ( collection assoc -- mdb-query-msg )
-     [ mdb-query-msg new ] 2dip
-     [ >>collection ] dip
-     >>query OP_Query >>opcode ; inline
+CONSTRUCTOR: mdb-getmore-msg ( collection return# -- mdb-getmore-msg )
+    OP_GetMore >>opcode ; inline
+
+CONSTRUCTOR: mdb-delete-msg ( collection selector -- mdb-delete-msg )
+    OP_Delete >>opcode ; inline
+
+CONSTRUCTOR: mdb-query-msg ( collection query -- mdb-query-msg )
+    OP_Query >>opcode ; inline
 
 GENERIC: <mdb-killcursors-msg> ( object -- mdb-killcursors-msg )
 

USING: io io.encodings.utf8 io.encodings.binary alien.c-types alien.strings math
bson.writer sequences kernel accessors io.streams.byte-array fry generalizations
combinators bson.reader sequences tools.walker assocs strings linked-assocs namespaces
byte-vectors byte-arrays ;

IN: mongodb.msg



M: integer <mdb-killcursors-msg> ( integer -- mdb-killcursors-msg )
    V{ } clone [ push ] keep <mdb-killcursors-msg> ;

GENERIC# <mdb-insert-msg> 1 ( collection objects -- mdb-insert-msg )

