From 8ff18b43dc687fe8588610d1ca7ee06e45fac153 Mon Sep 17 00:00:00 2001 From: Charlie Fish Date: Sun, 19 Apr 2020 15:48:32 -0600 Subject: [PATCH] Updating documentation for Model.transaction.condition to accept conditional instance --- docs/docs/api/Model.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/docs/api/Model.md b/docs/docs/api/Model.md index a99d041af..ee06a4865 100644 --- a/docs/docs/api/Model.md +++ b/docs/docs/api/Model.md @@ -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)