Search in sources :

Example 1 with SetFieldUpdateAction

use of com.torodb.mongodb.language.update.SetFieldUpdateAction in project torodb by torodb.

the class UpdateActionTranslator method translateSetField.

private static void translateSetField(CompositeUpdateAction.Builder builder, BsonDocument argument) {
    for (Entry<?> entry : argument) {
        Collection<AttributeReference> attRefs = parseAttributeReference(entry.getKey());
        KvValue<?> translatedValue = MongoWpConverter.translate(entry.getValue());
        builder.add(new SetFieldUpdateAction(attRefs, translatedValue), false);
    }
}
Also used : AttributeReference(com.torodb.core.language.AttributeReference) SetFieldUpdateAction(com.torodb.mongodb.language.update.SetFieldUpdateAction)

Aggregations

AttributeReference (com.torodb.core.language.AttributeReference)1 SetFieldUpdateAction (com.torodb.mongodb.language.update.SetFieldUpdateAction)1