Class StreamRecord
The change that a stream ChangeRecord describes.
public sealed record StreamRecord : IEquatable<StreamRecord>
- Inheritance
-
StreamRecord
- Implements
- Inherited Members
Remarks
Which of NewImage and OldImage are present depends on StreamViewType and on the kind of change: an insert has no old image and a removal has no new image. An image is an Item, so To<T>() reads it as an entity.
Constructors
StreamRecord()
public StreamRecord()
Properties
ApproximateCreationDateTime
Gets approximately when the change was made (ApproximateCreationDateTime; DynamoDB sends seconds since the Unix epoch).
DynamoDB sends it with every record: null only if the response omits it.
public DateTimeOffset? ApproximateCreationDateTime { get; init; }
Property Value
Keys
Gets the key attributes of the item. DynamoDB sends them with every record: null only if the response omits them.
public IReadOnlyDictionary<string, AttributeValue>? Keys { get; init; }
Property Value
NewImage
Gets the item as it is after the change. Non-null only if the stream view includes new images (NewImage or NewAndOldImages) and the item exists after the change, so null for a removal.
public Item? NewImage { get; init; }
Property Value
OldImage
Gets the item as it was before the change. Non-null only if the stream view includes old images (OldImage or NewAndOldImages) and the item existed before the change, so null for an insert.
public Item? OldImage { get; init; }
Property Value
SequenceNumber
Gets the sequence number of the record within its shard. Opaque and increasing; pass the one of the last processed record to AfterSequenceNumber to resume. DynamoDB sends it with every record: null only if the response omits it.
public string? SequenceNumber { get; init; }
Property Value
SizeBytes
Gets the size of the record in bytes, including the keys, the images and the metadata. DynamoDB sends it with every record: null only if the response omits it.
public long? SizeBytes { get; init; }
Property Value
- long?
StreamViewType
Gets what the stream records contain.
public StreamViewType StreamViewType { get; init; }
Property Value
Methods
Equals(StreamRecord?)
public bool Equals(StreamRecord? other)
Parameters
otherStreamRecord
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(StreamRecord?, StreamRecord?)
public static bool operator ==(StreamRecord? left, StreamRecord? right)
Parameters
leftStreamRecordrightStreamRecord
Returns
operator !=(StreamRecord?, StreamRecord?)
public static bool operator !=(StreamRecord? left, StreamRecord? right)
Parameters
leftStreamRecordrightStreamRecord