update_field_return_old
Update one field value from a single record and return it's previous value, in a single database operation.
If the update fails (whether because the value_to_set
was invalid, or because of a database error), update_success
will be False
and retrieved_old_value
will be None.
#
ParametersProperty name | Required | Accepted types | Default | Description |
---|---|---|---|---|
key_value | YES | Any | - | The path expression to target the attribute to set/update in your record. See Field path selectors |
field_path | YES | str | - | The path expression to target the attribute to set/update in your record. See Field path selectors |
query_kwargs | NO | dict | None | Used to pass data to populate a field_path that contains keys. See example below : |
value_to_set | YES | Any | The value that will be set/update the attribute you selected with the field_path property. | |
data_validation | NO | bool | True | Whether data validation from your table model should be applied on the retrieved data. |
#
AvailabilityTable | Available |
---|---|
DynamoDBBasicTable | ✅ |
DynamoDBCachingTable | ✅ |
ExternalDynamoDBApiBasicTable | ✅ |
ExternalDynamoDBApiCachingTable | ✅ |