Skip to content

Commit 47bd60a

Browse files
authored
Move collectionGroup method out of the Internal category (#2802)
This prevents a warning for end users.
1 parent 071d6e9 commit 47bd60a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Firestore/Source/API/FIRFirestore.mm

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,18 @@ - (FIRDocumentReference *)documentWithPath:(NSString *)documentPath {
204204
return [[FIRDocumentReference alloc] initWithReference:std::move(documentReference)];
205205
}
206206

207+
- (FIRQuery *)collectionGroupWithID:(NSString *)collectionID {
208+
if (!collectionID) {
209+
ThrowInvalidArgument("Collection ID cannot be nil.");
210+
}
211+
if ([collectionID containsString:@"/"]) {
212+
ThrowInvalidArgument("Invalid collection ID (%s). Collection IDs must not contain / in them.",
213+
collectionID);
214+
}
215+
216+
return _firestore->GetCollectionGroup(collectionID);
217+
}
218+
207219
- (FIRWriteBatch *)batch {
208220
return _firestore->GetBatch();
209221
}
@@ -273,18 +285,6 @@ + (FIRFirestore *)recoverFromFirestore:(Firestore *)firestore {
273285
return (__bridge FIRFirestore *)firestore->extension();
274286
}
275287

276-
- (FIRQuery *)collectionGroupWithID:(NSString *)collectionID {
277-
if (!collectionID) {
278-
ThrowInvalidArgument("Collection ID cannot be nil.");
279-
}
280-
if ([collectionID containsString:@"/"]) {
281-
ThrowInvalidArgument("Invalid collection ID (%s). Collection IDs must not contain / in them.",
282-
collectionID);
283-
}
284-
285-
return _firestore->GetCollectionGroup(collectionID);
286-
}
287-
288288
- (void)shutdownWithCompletion:(nullable void (^)(NSError *_Nullable error))completion {
289289
_firestore->Shutdown(completion);
290290
}

0 commit comments

Comments
 (0)