Table of Contents

Class TransactUpdate

Namespace
DynaSharp.Requests
Assembly
DynaSharp.dll

Changes the attributes of an existing item, or creates the item if no item has the key, as part of a TransactWriteItemsRequest, with the effect of UpdateItem. Named Update in the DynamoDB service model.

public sealed record TransactUpdate : IEquatable<TransactUpdate>
Inheritance
TransactUpdate
Implements
Inherited Members

Constructors

TransactUpdate()

public TransactUpdate()

Properties

ConditionExpression

Gets a condition on the existing item that must hold, for example "attribute_exists(pk) AND version = :expected". When it does not hold, the whole transaction is cancelled and the reason for this action is ConditionalCheckFailed. Attribute names that are DynamoDB reserved words, such as name, status, size, order or total, must be aliased with a #placeholder defined in ExpressionAttributeNames; written directly, DynamoDB rejects the request with a ValidationException. See the list of reserved words.

public string? ConditionExpression { get; init; }

Property Value

string

ExpressionAttributeNames

Gets the substitutions for #name placeholders in the update and condition expressions. Use it to alias attribute names that are DynamoDB reserved words, such as name, status, size, order or total, which DynamoDB rejects with a ValidationException when an expression uses them directly (the check is case-insensitive), and names with a dot or other special characters. See the list of reserved words.

public IReadOnlyDictionary<string, string>? ExpressionAttributeNames { get; init; }

Property Value

IReadOnlyDictionary<string, string>

ExpressionAttributeValues

Gets the substitutions for :value placeholders in the update and condition expressions.

public IReadOnlyDictionary<string, AttributeValue>? ExpressionAttributeValues { get; init; }

Property Value

IReadOnlyDictionary<string, AttributeValue>

Key

Gets the full primary key of the item: the partition key and, if the table has one, the sort key. Key attributes cannot be updated.

public required IReadOnlyDictionary<string, AttributeValue> Key { get; init; }

Property Value

IReadOnlyDictionary<string, AttributeValue>

ReturnValuesOnConditionCheckFailure

Gets whether a failed condition returns the existing item in Item.

public ReturnValuesOnConditionCheckFailure ReturnValuesOnConditionCheckFailure { get; init; }

Property Value

ReturnValuesOnConditionCheckFailure

TableName

Gets the table name (or table ARN).

public required string TableName { get; init; }

Property Value

string

UpdateExpression

Gets the actions to apply, in the syntax of UpdateExpression, for example "SET visits = visits + :one REMOVE tempFlag". At most 4 KB. Like UpdateItem this creates the item when it does not exist, unless ConditionExpression forbids it. Attribute names that are DynamoDB reserved words, such as name, status, size, order or total, must be aliased with a #placeholder defined in ExpressionAttributeNames; written directly, DynamoDB rejects the request with a ValidationException. See the list of reserved words.

public required string UpdateExpression { get; init; }

Property Value

string

Methods

Equals(TransactUpdate?)

public bool Equals(TransactUpdate? other)

Parameters

other TransactUpdate

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 ==(TransactUpdate?, TransactUpdate?)

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

Parameters

left TransactUpdate
right TransactUpdate

Returns

bool

operator !=(TransactUpdate?, TransactUpdate?)

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

Parameters

left TransactUpdate
right TransactUpdate

Returns

bool