Skip to content

Commit

Permalink
Updating documentation for Model.transaction.condition to accept cond…
Browse files Browse the repository at this point in the history
…itional instance
  • Loading branch information
fishcharlie committed Apr 19, 2020
1 parent 620599d commit 8ff18b4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions docs/docs/api/Model.md
Expand Up @@ -704,11 +704,15 @@ You can pass in the same parameters into each method that you do for the normal

These methods are only meant to only be called to instantiate the `dynamoose.transaction` array.

### Model.transaction.condition(key, additionalParameters)
### Model.transaction.condition(key, condition)

This method allows you to run a conditionCheck when running a DynamoDB transaction.
This method allows you to run a `conditionCheck` when running a DynamoDB transaction.

The `additionalParameters` property will be appended to the result to allow you to set custom conditions.
The `condition` parameter is a `dynamoose.Condition` instance that represents the conditional you want to run.

```js
User.transaction.condition(1, new dynamoose.Condition("age").gt(13));
```

## Model.methods.set(name, function)

Expand Down

0 comments on commit 8ff18b4

Please sign in to comment.