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

feat: Add toString methods to classes comprising WriteBatch #1281

Merged
merged 7 commits into from
Jun 6, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -448,4 +448,10 @@ public boolean equals(Object obj) {
public int hashCode() {
return Objects.hash(rpcContext, docRef, fields);
}

@Override
public String toString() {
return String.format("DocumentSnapshot{docRef=%s, fields=%s, readTime=%s, updateTime=%s, createTime=%s}", docRef,
tom-andersen marked this conversation as resolved.
Show resolved Hide resolved
fields, readTime, updateTime, createTime);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ static class WriteOperation {
this.documentReference = documentReference;
this.write = write;
}

@Override
public String toString() {
return String.format("WriteOperation{write=%s, documentReference=%s}", write, documentReference);
}
}

final FirestoreImpl firestore;
Expand Down Expand Up @@ -646,4 +651,9 @@ List<WriteOperation> getWrites() {
public int getMutationsSize() {
return writes.size();
}

@Override
public String toString() {
return String.format("UpdateBuilder{writes=%s, committed=%s}", writes, committed);
tom-andersen marked this conversation as resolved.
Show resolved Hide resolved
}
}