Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-588

show_record_id filter not working

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.1.1
    • Component/s: None
    • Labels:

      The show_record_id filter does not seem to do anything.

      Unable to find source-code formatter for language: rust. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      use mongodb::bson::doc;
      use mongodb::sync::Client;
      
      fn main() {
          let client = Client::with_uri_str("mongodb://localhost:27017").unwrap();
          let db = client.database("test");
      
          db.collection("test")
              .insert_one(doc! {"msg": "hi"}, None)
              .unwrap();
      
          let find_opts = mongodb::options::FindOptions::builder()
              .show_record_id(false)
              .build();
      
          let cursor = db.collection("test").find(None, find_opts).unwrap();
      
          println!("{:#?}", cursor.last());
      }
      

      output:

      Some(
          Ok(
              Document({"_id": ObjectId(ObjectId(5fa27b140040f3f40013ae1e)), "msg": String("hi")}),
          ),
      )
      

            Assignee:
            sam.rossi@mongodb.com Samuel Rossi (Inactive)
            Reporter:
            neye@zhaw.ch Johannes Neyer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: