ChangeStreamDocument

mongo4cats.models.collection.ChangeStreamDocument
See theChangeStreamDocument companion object
final case class ChangeStreamDocument[T](resumeToken: Document, operationType: OperationType, namespace: Option[MongoNamespace], destinationNamespace: Option[MongoNamespace], fullDocument: Option[T], fullDocumentBeforeChange: Option[T], documentKey: Option[Document], updateDescription: Option[UpdateDescription], txnNumber: Option[BsonValue], lsid: Option[Document], splitEvent: Option[SplitEvent], extraElements: Option[Document], clusterTime: Option[BsonValue], wallTime: Option[BsonValue])

Represents the changeStream aggregation output document.

Value parameters

clusterTime

the cluster time at which the change occurred

destinationNamespace

the destination namespace, used to indicate the destination of a collection rename event.

documentKey

a document containing the _id of the changed document

extraElements

any extra elements that are part of the change stream document but not otherwise mapped to fields

fullDocument

the full document, Contains the point-in-time post-image of the modified document if the post-image is available and either [[FullDocument# REQUIRED]] or [[FullDocument# WHEN_AVAILABLE]] was specified for the fullDocument option when creating the change stream. A post-image is always available for [[OperationType# INSERT]] and [[OperationType# REPLACE]] events.

fullDocumentBeforeChange

the full document before change. Contains the pre-image of the modified or deleted document if the pre-image is available for the change event and either [[FullDocumentBeforeChange# REQUIRED]] or [[FullDocumentBeforeChange# WHEN_AVAILABLE]] was specified for the fullDocumentBeforeChange option when creating the change stream. If [[FullDocumentBeforeChange# WHEN_AVAILABLE]] was specified but the pre-image is unavailable, the value will be null.

lsid

the identifier for the session associated with the transaction

namespace

the namespace, derived from the "ns" field in a change stream document.

operationType

the operation type

resumeToken

the resume token

splitEvent

the split event

txnNumber

the transaction number

updateDescription

the update description

wallTime

the wall time of the server at the moment the change occurred

Attributes

Since

4.11

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product