Abstract base class for all transact items.

### Type parameters

- #### T

- #### I: ConditionCheck | Put | Update | Delete

- #### R: TransactBaseOperation<T, I, any>

### Hierarchy

- TransactBaseOperation
  - TransactConditionCheck
  - TransactDelete
  - TransactPut
  - TransactUpdate

### Implements

- ConditionalParamsHost

## Index

### Constructors

- constructor

### Properties

- metadata
- modelClazz
- params
- transactItem

### Methods

- onlyIf
- onlyIfAttribute
- returnValuesOnConditionCheckFailure

## Constructors

### Protected constructor

- new TransactBaseOperation(modelClazz: ModelConstructor<T>): TransactBaseOperation

- - Defined in dynamo/transactwrite/transact-base-operation.ts:29

  #### Parameters

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

  #### Returns TransactBaseOperation

## Properties

### metadata

metadata: Metadata<T>

- Defined in dynamo/transactwrite/transact-base-operation.ts:26

### modelClazz

modelClazz: ModelConstructor<T>

- Defined in dynamo/transactwrite/transact-base-operation.ts:27

### params

params: I

- Defined in dynamo/transactwrite/transact-base-operation.ts:25

### Abstract transactItem

transactItem: TransactWriteItem

- Defined in dynamo/transactwrite/transact-base-operation.ts:29

## Methods

### onlyIf

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

- - Defined in dynamo/transactwrite/transact-base-operation.ts:61

  add a condition necessary for the transaction to succeed

  example

    req.onlyIf(or(attribute('age').lt(10), attribute('age').gt(20)))

  #### Parameters

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

  #### Returns R

### onlyIfAttribute

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

- - Defined in dynamo/transactwrite/transact-base-operation.ts:51

  create a condition on given attributePath

  example

    req.onlyIfAttribute('age').lt(10)

  #### Type parameters

  - #### K: keyof T

  #### Parameters

  - ##### attributePath: K

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

- - Defined in dynamo/transactwrite/transact-base-operation.ts:52

  #### Parameters

  - ##### attributePath: string

  #### Returns RequestConditionFunction<R, T>

### returnValuesOnConditionCheckFailure

- returnValuesOnConditionCheckFailure(value: DynamoDB.ReturnValuesOnConditionCheckFailure): R

- - Defined in dynamo/transactwrite/transact-base-operation.ts:70

  get the item attributes if the condition fails

  #### Parameters

  - ##### value: DynamoDB.ReturnValuesOnConditionCheckFailure

  #### Returns R