Table of Contents

Class LocalIndexKeyAttribute

Namespace
DynaSharp.Mapping
Assembly
DynaSharp.dll

Declares the sort key of a local secondary index. A local index shares the partition key of the table, so there is nothing to declare for it, and it requires a table with a sort key. The default attribute name comes from the lowercase index name, so index LSI1 uses lsi1sk.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Struct, AllowMultiple = true, Inherited = false)]
public sealed class LocalIndexKeyAttribute : Attribute
Inheritance
LocalIndexKeyAttribute
Inherited Members

Remarks

The attribute name and the bare placeholder rule work as on GlobalIndexKeyAttribute.

Constructors

LocalIndexKeyAttribute(string, string)

Initializes a new instance of the LocalIndexKeyAttribute class.

public LocalIndexKeyAttribute(string indexName, string sortKey)

Parameters

indexName string

The DynamoDB name of the index: 3 to 255 of a-z, A-Z, 0-9, _, - and ..

sortKey string

The key template of the index sort key.

Properties

IndexName

Gets the DynamoDB name of the index.

public string IndexName { get; }

Property Value

string

SortKey

Gets the key template of the index sort key.

public string SortKey { get; }

Property Value

string

SortKeyAttributeName

Gets or sets the name of the attribute that holds the index sort key.

public string? SortKeyAttributeName { get; set; }

Property Value

string

Sparse

Gets or sets a value indicating whether items without a value leave the index. When any input of the template is null, the key attribute is not written. Nullable inputs require this.

public bool Sparse { get; set; }

Property Value

bool