Unset class

$unset aggregation stage

Stage description

Available since MongoDB version 4.2

Removes/excludes fields from documents.

Example:

Dart code:

Unset([ "isbn", "author.first", "copies.warehouse" ]).build()

Equivalent mongoDB aggregation stage:

{ $unset: [ "isbn", "author.first", "copies.warehouse" ] }

https://docs.mongodb.com/manual/reference/operator/aggregation/unset/

Inheritance

Constructors

Unset(List<String> fields)
Creates $unset aggreagation stage

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build() Map<String, Object>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited