Options
All
  • Public
  • Public/Protected
  • All
Menu

@aws/dynamodb-auto-marshaller

Index

Type aliases

BinaryValue

BinaryValue: ArrayBuffer | ArrayBufferView

EmptyHandlingStrategy

EmptyHandlingStrategy: keyof object

The behavior the marshaller should exhibit when it encounters "empty" data that would be rejected as invalid by DynamoDB, such as 0-length buffers or the string ''.

Possible values:

  • omit - Remove the empty value from the marshalled output (i.e., marshall this value to undefined rather than to an {AttributeValue}).

  • nullify - Convert the value from its detected to data type to null. This allows marshalled data to preserve a sigil of emptiness in a way compatible with DynamoDB.

    This option will also cause empty strings and buffers to be dropped from string and binary sets, respectively.

  • leave - Do not alter the value.

InvalidHandlingStrategy

InvalidHandlingStrategy: keyof object

The behavior the marshaller should exhibit when it encounters data that cannot be marshalled to a DynamoDB AttributeValue, such as a Symbol or Function object.

Possible values:

  • omit - Remove any invalid values from the serialized output.

  • throw - Throw an error when an unserializable value is encountered.

UnmarshalledAttributeValue

UnmarshalledAttributeValue: string | number | NumberValue | BinaryValue | Set<string> | Set<number> | NumberValueSet | BinarySet | null | boolean | UnmarshalledListAttributeValue | UnmarshalledMapAttributeValue

Functions

isArrayBuffer

  • isArrayBuffer(arg: any): boolean
  • Determines if the provided argument is an ArrayBuffer object. Compatible with ArrayBuffers created in separate iframes and VMs.

    Parameters

    • arg: any

    Returns boolean

Object literals

Const EmptyHandlingStrategies

EmptyHandlingStrategies: object

leave

leave: string = "leave"

nullify

nullify: string = "nullify"

omit

omit: string = "omit"

Const InvalidHandlingStrategies

InvalidHandlingStrategies: object

omit

omit: string = "omit"

Remove any invalid values from the serialized output.

throw

throw: string = "throw"

Throw an error when an unserializable value is encountered.