field method

Document field(
  1. Map<String, bool> projection
)

Implementation

Document field(Map<String, bool> projection) {
  Map<String, int> newProjection = {};
  projection.forEach((key, value) {
    newProjection[key] = value ? 1 : 0;
  });

  return Document(
    core: _core,
    coll: _coll,
    docId: _id,
    projection: newProjection,
  );
}