1.10.5 • Published 9 months ago

@effect-aws/lib-dynamodb v1.10.5

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@effect-aws/lib-dynamodb

npm version npm downloads

Installation

npm install --save @effect-aws/lib-dynamodb

Usage

With default DynamoDBClient instance:

import { DynamoDBDocument } from "@effect-aws/lib-dynamodb"

const program = DynamoDBDocument.put(args)

const result = pipe(
  program,
  Effect.provide(DynamoDBDocument.defaultLayer),
  Effect.runPromise
)

With custom DynamoDBClient instance:

import { DynamoDBDocument } from "@effect-aws/lib-dynamodb"

const program = DynamoDBDocument.put(args)

const result = await pipe(
  program,
  Effect.provide(
    DynamoDBDocumentClient.from(
      new DynamoDBClient({ region: "eu-central-1" }),
      { marshallOptions: { removeUndefinedValues: true } }
    )
  ),
  Effect.runPromise
)

With custom DynamoDBClient configuration:

import { DynamoDBDocument } from "@effect-aws/lib-dynamodb"

const program = DynamoDBDocument.put(args)

const result = await pipe(
  program,
  Effect.provide(
    DynamoDBDocument.layer({
      marshallOptions: { removeUndefinedValues: true }
    })
  ),
  Effect.runPromiseExit
)

or use DynamoDBDocument.baseLayer((default) => DynamoDBDocumentClient.from(new DynamoDBClient({ ...default, region: "eu-central-1" }), { marshallOptions: { removeUndefinedValues: true } }))

1.10.5

9 months ago

1.10.4

9 months ago

1.10.3

10 months ago

1.10.2

10 months ago

1.9.0

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.1

1 year ago

1.9.5

12 months ago

1.9.3

1 year ago

1.10.0

11 months ago

1.3.0

1 year ago

1.2.0

2 years ago

1.1.1

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago