Instance Methodmongokitten 7.9.5MongoKittenCore
addLiteral(_:at:)
Projection.swift:197mutating func addLiteral(_ literal: Primitive, at name: FieldPath)
Other members in extension
Types
enum ProjectionExpression
An expression that can be specified to either include or exclude a field (or some custom value)
Type members
init(dictionaryLiteral: (FieldPath, ProjectionExpression)...
) init(document: Document
) static func allExcluding(Set<String>
) -> Projection static func subset(Set<String>, suppressingId: Bool
) -> Projection
Instance members
var document: Document
var minimalVersion: WireVersion?
func encode(to: Encoder
) throws func exclude(FieldPath
) Excludes the field from the projection
func exclude(Set<FieldPath>
) Excludes the field from the projection
func include(FieldPath
) Includes the field in the projection
func include(Set<FieldPath>
) Includes the field in the projection
func moveRoot(to: FieldPath
) Makes the entire document available at a new location.
func projectElements(inArray: FieldPath, from: Int, count: Int
) func projectFirst(Int, forArray: FieldPath
) func projectFirstElement(forArray: FieldPath
) func projectLast(Int, forArray: FieldPath
) func rename(FieldPath, to: FieldPath
) Renames a field.