id static method

Map<String, Object?> id(
  1. String id
)

Matches a document based on a string ID.

Converts the string to an ObjectId using the oID extension.

Example:

var query = DQ.id('507f191e810c19729de860ea'); // { '_id': ObjectId(...) }

Implementation

static Map<String, Object?> id(String id) {
  return {
    '_id': id.oID,
  };
}