@karmaniverous/entity-client-dynamodb
    Preparing search index...

    Class EntityClient<C, CF>

    Convenience wrapper around the AWS DynamoDB SDK in addition to BaseEntityClient functionality.

    This class exposes DynamoDBClient and DynamoDBDocument for direct access, and delegates high-level operations to small helper modules.

    For query operations, use the QueryBuilder class.

    Type Parameters

    Hierarchy

    Index

    Constructors

    Properties

    batchProcessOptions: NonNullable<
        BaseEntityClientOptions<CC, CF>["batchProcessOptions"],
    >

    Default batch process options.

    AWS SDK DynamoDBClient instance.

    AWS SDK DynamoDBDocument instance.

    entityManager: EntityManager<C, CF>

    EntityManager instance.

    logger: NonNullable<BaseEntityClientOptions<CC, CF>["logger"]>

    Injected logger object. Must support debug and error methods. Default: console

    tableName: string

    Table name.

    Methods

    • Token-aware getItem overloads (records). Strip keys in handlers when needed via entityManager.removeKeys.

      Token-aware with tuple projection (attributes as const) -> projected DB record

      Type Parameters

      • ET extends string | number | symbol
      • A extends readonly string[]

      Parameters

      • entityToken: ET
      • key: EntityKey<C>
      • attributes: A
      • Optionaloptions: MakeOptional<
            Omit<
                GetCommandInput,
                | "AttributesToGet"
                | "ProjectionExpression"
                | "ExpressionAttributeNames"
                | "Key",
            >,
            "TableName",
        >

      Returns Promise<
          Omit<GetCommandOutput, "Item"> & {
              Item?: EntityRecordPartial<C, ET, A>;
          },
      >

    • Token-aware getItem overloads (records). Strip keys in handlers when needed via entityManager.removeKeys.

      Token-aware with tuple projection (attributes as const) -> projected DB record

      Type Parameters

      • ET extends string | number | symbol

      Parameters

      • entityToken: ET
      • key: EntityKey<C>
      • attributes: string[]
      • Optionaloptions: MakeOptional<
            Omit<
                GetCommandInput,
                | "AttributesToGet"
                | "ProjectionExpression"
                | "ExpressionAttributeNames"
                | "Key",
            >,
            "TableName",
        >

      Returns Promise<Omit<GetCommandOutput, "Item"> & { Item?: EntityRecord<C, ET> }>

    • Token-aware getItem overloads (records). Strip keys in handlers when needed via entityManager.removeKeys.

      Token-aware with tuple projection (attributes as const) -> projected DB record

      Type Parameters

      • ET extends string | number | symbol

      Parameters

      • entityToken: ET
      • key: EntityKey<C>
      • Optionaloptions: MakeOptional<
            Omit<
                GetCommandInput,
                | "AttributesToGet"
                | "ProjectionExpression"
                | "ExpressionAttributeNames"
                | "Key",
            >,
            "TableName",
        >

      Returns Promise<Omit<GetCommandOutput, "Item"> & { Item?: EntityRecord<C, ET> }>

    • Token-aware getItem overloads (records). Strip keys in handlers when needed via entityManager.removeKeys.

      Token-aware with tuple projection (attributes as const) -> projected DB record

      Type Parameters

      • ET extends string | number | symbol

      Parameters

      Returns Promise<Omit<GetCommandOutput, "Item"> & { Item?: EntityRecord<C, ET> }>