CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 19: C100DEV: MongoDB Associate Developer

Given the following sample documents:{ _id: 1, firstName: “Person1”, company: “CompanyA”, active: false }{ _id: 2, firstName: “Person2”, company: “CompanyB”, active: false }{ _id: 3, firstName: “Person3”, company: “CompanyC”, active: true }{ _id: 4, firstName: “Person4”, company: “CompanyD”, active: true }What code bl…

Nội dung câu hỏi

Given the following sample documents:{ _id: 1, firstName: “Person1”, company: “CompanyA”, active: false }{ _id: 2, firstName: “Person2”, company: “CompanyB”, active: false }{ _id: 3, firstName: “Person3”, company: “CompanyC”, active: true }{ _id: 4, firstName: “Person4”, company: “CompanyD”, active: true }What code block should be used to delete the third document from a MongoDB collection in Java?

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. collection.DeleteOne(eq(“_id”, new ObjectID(3))));
  2. B. collection.Delete(eq(“_id”, new ObjectID(3))));
  3. C. collection.Delete(eq(“_id”, 3));
  4. D. collection.DeleteOne(eq(“_id”, 3)); — đáp án hiện tại

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề