File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed
google-cloud-firestore/src/main/java/com/google/cloud/firestore Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -213,16 +213,14 @@ public static void Demo11_MultipleAggregations(Firestore db) throws Exception {
213
213
}
214
214
215
215
public static void Demo12_Transaction (Firestore db ) throws Exception {
216
- db .runTransaction (txn -> {
217
- AggregateQuery query = db
218
- .collection ("games" )
219
- .document ("halo" )
220
- .collection ("players" )
221
- .aggregate (count ());
222
- AggregateQuerySnapshot snapshot = txn .get (query ).get ();
223
- assertEqual (snapshot .get (count ()), 5_000_000 );
224
- return null ;
225
- });
216
+ db .runTransaction (
217
+ txn -> {
218
+ AggregateQuery query =
219
+ db .collection ("games" ).document ("halo" ).collection ("players" ).aggregate (count ());
220
+ AggregateQuerySnapshot snapshot = txn .get (query ).get ();
221
+ assertEqual (snapshot .get (count ()), 5_000_000 );
222
+ return null ;
223
+ });
226
224
}
227
225
228
226
private static void assertEqual (Long num1 , Long num2 ) {
You can’t perform that action at this time.
0 commit comments