use of com.google.firebase.firestore.model.FieldPath in project firebase-android-sdk by firebase.
the class RemoteSerializer method decodeFieldFilter.
@VisibleForTesting
FieldFilter decodeFieldFilter(StructuredQuery.FieldFilter proto) {
FieldPath fieldPath = FieldPath.fromServerFormat(proto.getField().getFieldPath());
FieldFilter.Operator filterOperator = decodeFieldFilterOperator(proto.getOp());
return FieldFilter.create(fieldPath, filterOperator, proto.getValue());
}
use of com.google.firebase.firestore.model.FieldPath in project firebase-android-sdk by firebase.
the class SetMutation method applyToLocalView.
@Override
public FieldMask applyToLocalView(MutableDocument document, @Nullable FieldMask previousMask, Timestamp localWriteTime) {
verifyKeyMatches(document);
if (!this.getPrecondition().isValidFor(document)) {
return previousMask;
}
Map<FieldPath, Value> transformResults = localTransformResults(localWriteTime, document);
ObjectValue localValue = value.clone();
localValue.setAll(transformResults);
document.convertToFoundDocument(document.getVersion(), localValue).setHasLocalMutations();
// SetMutation overwrites all fields.
return null;
}
Aggregations