abstract class for all basic write request classes (DeleteItem, PutItem, UpdateItem

### Type parameters

- #### T

- #### I: DeleteItemInput | PutItemInput | UpdateItemInput

- #### O: DeleteItemOutput | PutItemOutput | UpdateItemOutput

- #### R: WriteRequest<T, I, O, R>

### Hierarchy

- StandardRequest<T, I, R>
  - WriteRequest
    - DeleteRequest
    - PutRequest
    - UpdateRequest

## Index

### Constructors

- constructor

### Properties

- dynamoDBWrapper
- logger
- metadata
- modelClazz
- params
- tableName

### Methods

- doRequest
- exec
- execFullResponse
- execNoMap
- onlyIf
- onlyIfAttribute
- returnConsumedCapacity
- returnItemCollectionMetrics

## Constructors

### Protected constructor

- new WriteRequest(dynamoDBWrapper: DynamoDbWrapper, modelClazz: ModelConstructor<T>): WriteRequest

- Overrides StandardRequest.constructor

  - Defined in dynamo/request/write.request.ts:34

  #### Parameters

  - ##### dynamoDBWrapper: DynamoDbWrapper

  - ##### modelClazz: ModelConstructor<T>

  #### Returns WriteRequest

## Properties

### dynamoDBWrapper

dynamoDBWrapper: DynamoDbWrapper

Inherited from BaseRequest.dynamoDBWrapper

- Defined in dynamo/request/base.request.ts:29

### Protected Abstract logger

logger: Logger

- Defined in dynamo/request/write.request.ts:34

### metadata

metadata: Metadata<T>

Inherited from BaseRequest.metadata

- Defined in dynamo/request/base.request.ts:39

metadata created from modelClazz

### modelClazz

modelClazz: ModelConstructor<T>

Inherited from BaseRequest.modelClazz

- Defined in dynamo/request/base.request.ts:34

corresponding Model Class

### params

params: I

Inherited from BaseRequest.params

- Defined in dynamo/request/base.request.ts:49

request input object

### tableName

tableName: string

Inherited from BaseRequest.tableName

- Defined in dynamo/request/base.request.ts:44

tableName created with configured tableNameResolver function

## Methods

### Protected Abstract doRequest

- doRequest(params: I): Promise<O>

- - Defined in dynamo/request/write.request.ts:41

  #### Parameters

  - ##### params: I

  #### Returns Promise<O>

### exec

- exec(): Promise<void>

- Overrides BaseRequest.exec

  - Defined in dynamo/request/write.request.ts:74

  #### Returns Promise<void>

  if no ReturnValues are requested, { T } if the requested ReturnValues are ALL_OLD|ALL_NEW or {Partial<T>} if the requested ReturnValues are UPDATED_OLD|UPDATED_NEW

### execFullResponse

- execFullResponse(): Promise<WriteResponse<O, T>>

- Overrides BaseRequest.execFullResponse

  - Defined in dynamo/request/write.request.ts:86

  execute request and return the full response

  #### Returns Promise<WriteResponse<O, T>>

### execNoMap

- execNoMap(): Promise<O>

- - Defined in dynamo/request/write.request.ts:109

  execute request without parsing (mapping) the response attributes to js objects

  #### Returns Promise<O>

### onlyIf

- onlyIf(...conditionDefFns: ConditionExpressionDefinitionFunction[]): R

- - Defined in dynamo/request/write.request.ts:65
  example

    writeRequest.onlyIf( attribute('age').eq(23) )

  example

    writeRequest.onlyIf( or( attribute('age').lt(18), attribute('age').gt(65) ) )

  #### Parameters

  - ##### Rest ...conditionDefFns: ConditionExpressionDefinitionFunction[]

  #### Returns R

### onlyIfAttribute

- onlyIfAttribute<K>(attributePath: K): RequestConditionFunctionTyped<R, T, K>
- onlyIfAttribute(attributePath: string): RequestConditionFunction<R, T>

- - Defined in dynamo/request/write.request.ts:55

  add a condition for propertyPath

  #### Type parameters

  - #### K: keyof T

  #### Parameters

  - ##### attributePath: K

  #### Returns RequestConditionFunctionTyped<R, T, K>

- - Defined in dynamo/request/write.request.ts:56

  #### Parameters

  - ##### attributePath: string

  #### Returns RequestConditionFunction<R, T>

### returnConsumedCapacity

- returnConsumedCapacity(level: DynamoDB.ReturnConsumedCapacity): R

- Inherited from BaseRequest.returnConsumedCapacity

  - Defined in dynamo/request/base.request.ts:75

  return ConsumedCapacity of the corresponding table(s) in the response

  #### Parameters

  - ##### level: DynamoDB.ReturnConsumedCapacity

    not all requests support all values

  #### Returns R

### returnItemCollectionMetrics

- returnItemCollectionMetrics(returnItemCollectionMetrics: DynamoDB.ReturnItemCollectionMetrics): R

- - Defined in dynamo/request/write.request.ts:46

  return item collection metrics.

  #### Parameters

  - ##### returnItemCollectionMetrics: DynamoDB.ReturnItemCollectionMetrics

  #### Returns R