Table of Contents

Class CreateTableResult

Namespace
DynaSharp
Assembly
DynaSharp.dll

What a CreateTableCommand returns: the table, and what this call changed about it. A program that creates its table at every start learns here whether this start created it or turned time to live on, for a log line or a metric, without a call of its own.

public sealed class CreateTableResult
Inheritance
CreateTableResult
Inherited Members

Properties

Created

Gets a value indicating whether the CreateTable of this call created the table. It is false when IfNotExists() found it, at the first look or after a ResourceInUseException because another process created it first. A retry of a create whose response was lost is such a case too: the table may be this call's, and nothing tells the two apart. Without IfNotExists() a call that returns created the table, so this is true.

public bool Created { get; }

Property Value

bool

Drift

Gets how a table that IfNotExists() found differs from what the command declares, in ways that let part of the code work: an index the entities declare that the table lacks or has with other keys, time to live on another attribute than the one asked for, and a stream that differs from Stream(StreamViewType). The command changes none of it, and logs it once as a warning (event 14). It is empty for a table this call created, and when nothing differs.

public IReadOnlyList<TableDrift> Drift { get; }

Property Value

IReadOnlyList<TableDrift>

Remarks

What the table has beyond the command is no drift, since other code may use it: another index, another attribute, time to live or a stream the command does not ask for. A key that differs is no drift either: SendAsync(CancellationToken) throws an InvalidOperationException for it. IfNotExists() says what is compared.

Table

Gets the description of the table: the one CreateTable answered, the active one after a wait, or, with IfNotExists(), the one the first look found. Time to live is no part of it, because DescribeTable does not report it.

public TableDescription Table { get; }

Property Value

TableDescription

TimeToLiveEnabled

Gets a value indicating whether this call turned time to live on, with an UpdateTimeToLive that DynamoDB accepted: on a table it created, or on one it found without it. DynamoDB may still report ENABLING then. It is false without TimeToLive(string), when time to live was ENABLED or ENABLING on that attribute already, and when another instance of the program turned it on first, which DynamoDB answers with a ValidationException that the command takes for success.

public bool TimeToLiveEnabled { get; }

Property Value

bool