Amazon DynamoDB · Types · Amazon DynamoDB's own types

ArxDynamoSingleTableBuilder

Definition

Namespace
ARX.SDK.DynamoDb.Model
Package
ARX.SDK.DynamoDb
C#
public sealed class ArxDynamoSingleTableBuilder

Declares the entities and indexes of one single table.

Methods

  • ArxDynamoSingleTableBuilder Entity(string name, string pk, string? sk = null)

    An entity of the table, its keys made from templates: pk: "CUSTOMER#{customer_id}", sk: "ORDER#{order_id}".

    Parameter Type Description
    namestringThe entity's name.
    pkstringThe partition key's template, such as CUSTOMER#{customer_id}.
    skstring?= nullThe sort key's template, such as ORDER#{order_id}; null when the table has no sort key.
  • ArxDynamoSingleTableBuilder Index(string name, string partitionKey, string? sortKey = null)

    A global secondary index of the table, keyed by its own attributes (often GSI1PK, GSI1SK).

    Parameter Type Description
    namestringThe index's name in DynamoDB.
    partitionKeystringThe index's partition key attribute (often GSI1PK).
    sortKeystring?= nullThe index's sort key attribute (often GSI1SK); null for none.
  • ArxDynamoSingleTableBuilder EntityIndex(string entity, string index, string pk, string? sk = null)

    The index keys an entity writes, from templates: .EntityIndex("order", "GSI1", pk: "STATUS#{status}", sk: "{ordered_on}").

    Parameter Type Description
    entitystringThe entity that writes the index keys.
    indexstringThe index, declared with Index.
    pkstringThe template of the index's partition key, such as STATUS#{status}.
    skstring?= nullThe template of its sort key; null for none.