Amazon DynamoDB · Types · Amazon DynamoDB's own types

ArxDynamoModel

Definition

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

How ARX's entities are laid out in DynamoDB tables: one table per entity (Table), or several entities in one table with key templates (SingleTable), with their secondary indexes and write sharding. Build it once at startup. Immutable and thread-safe.

Properties

  • IReadOnlyCollection<ArxDynamoEntityMap> Entities { get; }

    Every entity, by name.

  • IReadOnlyCollection<ArxDynamoTableMap> Tables { get; }

    Every physical table.

Methods

  • static ArxDynamoModelBuilder Create()

    Starts a model: declare each table and entity, then call Build.

  • bool TryGetEntity(string name, out ArxDynamoEntityMap entity)

    Gets an entity's layout by name; false when the model doesn't have it.

    Parameter Type Description
    namestringThe entity's name.
    entityout ArxDynamoEntityMapIts layout when found; otherwise null.
  • IReadOnlyList<CreateTableRequest> ToCreateTableRequests()

    The create-table requests the model needs: keys, attribute definitions and the global secondary indexes, on-demand billing. For tests, samples and development: production tables belong to the infrastructure.

Usage

C#

A line from a verified sample; the full, runnable code is on its page.

var model = ArxDynamoModel.Create()

Create one record, in either design, scenario 1

Used in: