Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-866

It will raise runtime error at finish of program when using mongocxx::options::find.limit()

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Incomplete
    • Icon: Major - P3 Major - P3
    • None
    • 3.0.0
    • API
    • None
    • Ubuntu15.4 Clang3.6.0

    Description

      mongocxx::collection collection = conn["wechat"]["article"];
      bsoncxx::builder::stream::document condition, options;
      mongocxx::options::find opts;

      condition << "subscribeRobot" << open_document << "$exists" << 1 << close_document;
      options << "subscribeRobot" << 1;
      opts.projection(options.view());
      opts.limit(100);

      mongocxx::cursor cur = collection.find(condition.view(), opts);
      for(auto && doc:cur)

      { cout << bsoncxx::to_json(doc) << endl;}

      Attachments

        Activity

          People

            Unassigned Unassigned
            LeoZhao zy1989 [X]
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: