AWSDynamoDBObjectMapperSaveBehavior

enum AWSDynamoDBObjectMapperSaveBehavior {}

Enumeration of behaviors for the save operation.

  • Unknown SaveBehavior.

    Declaration

    Objective-C

    AWSDynamoDBObjectMapperSaveBehaviorUnknown

    Swift

    case unknown = 0
  • AWSDynamoDBObjectMapperSaveBehaviorUpdate will not affect unmodeled attributes on a save operation and a nil value for the modeled attribute will remove it from that item in DynamoDB. By default, the mapper uses AWSDynamoDBObjectMapperSaveBehaviorUpdate.

    Declaration

    Objective-C

    AWSDynamoDBObjectMapperSaveBehaviorUpdate

    Swift

    case update = 1
  • AWSDynamoDBObjectMapperSaveBehaviorUpdateSkipNullAttributes is similar to AWSDynamoDBObjectMapperSaveBehaviorUpdate, except that it ignores any null value attribute(s) and will NOT remove them from that item in DynamoDB. It also guarantees to send only one single updateItem request, no matter the object is key-only or not.

    Declaration

    Objective-C

    AWSDynamoDBObjectMapperSaveBehaviorUpdateSkipNullAttributes

    Swift

    case updateSkipNullAttributes = 2
  • AWSDynamoDBObjectMapperSaveBehaviorAppendSet treats scalar attributes (String, Number, Binary) the same as AWSDynamoDBObjectMapperSaveBehaviorUpdateSkipNullAttributes does. However, for set attributes, it will append to the existing attribute value, instead of overriding it. Caller needs to make sure that the modeled attribute type matches the existing set type, otherwise it would result in a service exception.

    Declaration

    Objective-C

    AWSDynamoDBObjectMapperSaveBehaviorAppendSet

    Swift

    case appendSet = 3
  • AWSDynamoDBObjectMapperSaveBehaviorClobber will clear and replace all attributes, included unmodeled ones, (delete and recreate) on save. Versioned field constraints will also be disregarded.

    Declaration

    Objective-C

    AWSDynamoDBObjectMapperSaveBehaviorClobber

    Swift

    case clobber = 4