Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 85 create required attributes on update #96

17 changes: 10 additions & 7 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -484,13 +484,6 @@ Scans a table. If callback is not provided, then a Scan object is returned. See

Updates and existing item in the table. Three types of updates: $PUT, $ADD, and $DELETE. Refer to DynamoDB's updateItem documentation for details on how PUT, ADD, and DELETE work.


##### Options

**allowEmptyArray**: boolean

If true, the attribute can be updated to an empty array. If falsey, empty arrays will remove the attribute. Defaults to false.

**$PUT**

Put is the default behavior. The two example below are identical.
@@ -527,6 +520,16 @@ Dog.update({ownerId: 4, name: 'Odie'}, {$DELETE: {age: null}}, function (err) {
})
```

##### Options

**allowEmptyArray**: boolean

If true, the attribute can be updated to an empty array. If falsey, empty arrays will remove the attribute. Defaults to false.

**createRequired**: boolean

If true, required attributes will be filled with their default values on update (regardless of you specifying them for the update). Defaults to true.

### Query

#### Model.query(query, options, callback)
Loading