def query(options, collection_name,<EOL>num_to_skip, num_to_return, query, field_selector=None):
data = struct.pack("<STR_LIT>", options)<EOL>data += bson._make_c_string(collection_name)<EOL>data += struct.pack("<STR_LIT>", num_to_skip)<EOL>data += struct.pack("<STR_LIT>", num_to_return)<EOL>data += bson.BSON.encode(query)<EOL>if field_selector is not None:<EOL><INDENT>data += bson.BSON.encode(field_selector)<EOL><DEDENT>return __pack_message(<NUM_LIT>, data)<EOL>
Get a **query** message.