trait Projection extends AnyRef
- Alphabetic
- By Inheritance
- Projection
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def combinedWith(anotherProjection: Projection): Projection
Merges 2 sequences of projection operations together.
Merges 2 sequences of projection operations together. If there are duplicate keys, the last one takes precedence.
- anotherProjection
the projection to be merged with
- returns
the projection
- abstract def computed[T](fieldName: String, expression: T): Projection
Creates a projection of a field whose value is computed from the given expression.
Creates a projection of a field whose value is computed from the given expression. Projection with an expression is only supported using the $project aggregation pipeline stage.
- fieldName
the field name
- expression
the expression
- returns
the projection
- abstract def elemMatch(fieldName: String, filter: Filter): Projection
Creates a projection that includes for the given field only the first element of the array value of that field that matches the given query filter.
Creates a projection that includes for the given field only the first element of the array value of that field that matches the given query filter.
- fieldName
the field name
- filter
the filter to apply
- returns
the projection
- abstract def elemMatch(fieldName: String): Projection
Creates a projection that includes for the given field only the first element of an array that matches the query filter.
Creates a projection that includes for the given field only the first element of an array that matches the query filter. This is referred to as the positional $ operator.
- fieldName
the field name whose value is the array
- returns
the projection
- abstract def exclude(fieldNames: Seq[String]): Projection
Creates a projection that excludes all of the given fields.
Creates a projection that excludes all of the given fields.
- fieldNames
the field names
- returns
the projection
- abstract def exclude(fieldName: String): Projection
Creates a projection that excludes all of the given fields.
Creates a projection that excludes all of the given fields.
- fieldName
the field name
- returns
the projection
- abstract def excludeId: Projection
Creates a projection that excludes the _id field.
Creates a projection that excludes the _id field. This suppresses the automatic inclusion of _id that is the default, even when other fields are explicitly included.
- returns
the projection
- abstract def include(fieldNames: Seq[String]): Projection
Creates a projection that includes all of the given fields.
Creates a projection that includes all of the given fields.
- fieldNames
the field names
- returns
the projection
- abstract def include(fieldName: String): Projection
Creates a projection that includes all of the given fields.
Creates a projection that includes all of the given fields.
- fieldName
the field name
- returns
the projection
- abstract def meta(fieldName: String, metaFieldName: String): Projection
Creates a $meta projection to the given field name for the given meta field name.
Creates a $meta projection to the given field name for the given meta field name.
- fieldName
the field name
- metaFieldName
the meta field name
- returns
the projection
- Since
4.1
- abstract def metaTextScore(fieldName: String): Projection
Creates a projection to the given field name of the textScore, for use with text queries.
Creates a projection to the given field name of the textScore, for use with text queries.
- fieldName
the field name
- returns
the projection
- abstract def slice(fieldName: String, skip: Int, limit: Int): Projection
Creates a projection to the given field name of a slice of the array value of that field.
Creates a projection to the given field name of a slice of the array value of that field.
- fieldName
the field name
- skip
the number of elements to skip before applying the limit
- limit
the number of elements to project
- returns
the projection
- abstract def slice(fieldName: String, limit: Int): Projection
Creates a projection to the given field name of a slice of the array value of that field.
Creates a projection to the given field name of a slice of the array value of that field.
- fieldName
the field name
- limit
the number of elements to project.
- returns
the projection
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)