Table of Contents

Class StreamRecord

Namespace
DynaSharp.Streams
Assembly
DynaSharp.dll

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

DateTimeOffset?

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

IReadOnlyDictionary<string, AttributeValue>

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

Item

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

Item

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

string

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

StreamViewType

Methods

Equals(StreamRecord?)

public bool Equals(StreamRecord? other)

Parameters

other StreamRecord

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(StreamRecord?, StreamRecord?)

public static bool operator ==(StreamRecord? left, StreamRecord? right)

Parameters

left StreamRecord
right StreamRecord

Returns

bool

operator !=(StreamRecord?, StreamRecord?)

public static bool operator !=(StreamRecord? left, StreamRecord? right)

Parameters

left StreamRecord
right StreamRecord

Returns

bool