Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Entity
    • Entity

Index

Constructors

  • new Entity(item?: Record<string, any>): Entity

Accessors

  • get _entityName(): string
  • get attributes(): Record<string, any>
  • set attributes(item: Record<string, any>): void
  • Returns Record<string, any>

  • Parameters

    • item: Record<string, any>

    Returns void

  • get dbAttributes(): Record<string, any>
  • get dbChildrenForeignKeys(): Record<string, string>
  • Returns Record<string, string>

  • get dbKey(): Record<string, any>
  • get dbParentForeignKeys(): Record<string, string>
  • get dirty(): boolean
  • set dirty(v: boolean): void
  • get entityConditionExpressionOpts(): { ConditionExpression: string; ExpressionAttributeNames: {}; ExpressionAttributeValues: {} }
  • Returns { ConditionExpression: string; ExpressionAttributeNames: {}; ExpressionAttributeValues: {} }

    • ConditionExpression: string
    • ExpressionAttributeNames: {}
      • ExpressionAttributeValues: {}
      • get error(): undefined | ValidationError
      • set error(v: undefined | ValidationError): void
      • get parents(): Entity[]
      • get valid(): boolean
      • get validatedAttributes(): undefined | Record<string, any>
      • set validatedAttributes(v: undefined | Record<string, any>): void
      • Returns undefined | Record<string, any>

      • Parameters

        • v: undefined | Record<string, any>

        Returns void

      • get _entityName(): string
      • get attributeList(): string[]

      Methods

      • delete(opts?: DeleteCommandInput): Promise<DeleteCommandOutput>
      • deleteWithChildren(): Promise<DeleteCommandOutput>
      • load(opts?: GetCommandInput): Promise<Entity>
      • loadWithRelated(): Promise<Entity>
      • toJSON(): { attributes: Record<string, any>; dirty: boolean; error: undefined | string; key: Record<string, any>; validatedAttributes: undefined | Record<string, any> }
      • Returns { attributes: Record<string, any>; dirty: boolean; error: undefined | string; key: Record<string, any>; validatedAttributes: undefined | Record<string, any> }

        • attributes: Record<string, any>
        • dirty: boolean
        • error: undefined | string
        • key: Record<string, any>
        • validatedAttributes: undefined | Record<string, any>
      • validate(): { error: undefined | ValidationError; value: any }
      • Returns { error: undefined | ValidationError; value: any }

        • error: undefined | ValidationError
        • value: any
      • addEntitiesToFilterExpression(opts: QueryCommandInput | ScanCommandInput, entityNames?: string[]): QueryCommandInput | ScanCommandInput
      • Parameters

        • opts: QueryCommandInput | ScanCommandInput
        • entityNames: string[] = []

        Returns QueryCommandInput | ScanCommandInput

      • create(attributes: Record<string, any>): Promise<Entity>
      • deleteItem(key: Record<string, any>, opts?: DeleteCommandInput): Promise<DeleteCommandOutput>
      • Parameters

        • key: Record<string, any>
        • Optional opts: DeleteCommandInput

        Returns Promise<DeleteCommandOutput>

      • getItem(key: Record<string, any>, opts?: GetCommandInput): Promise<Entity>
      • getItemWithRelated(key: Record<string, any>): Promise<Entity>
      • update(attributes: Record<string, any>): Promise<Entity>
      • validate(item: Record<string, any>): { error: undefined | ValidationError; value: any }
      • Parameters

        • item: Record<string, any>

        Returns { error: undefined | ValidationError; value: any }

        • error: undefined | ValidationError
        • value: any

      Generated using TypeDoc