Skip to content

Commit 427b089

Browse files
committed
[Docs] Add comment about isFieldDuplicated func.
1 parent 05728fa commit 427b089

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

Sources/SHFirestoreService/FirestoreQueryable.swift

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,17 @@ public protocol FirestoreQueryable {
3333
E: FirestoreEndopintable,
3434
D == E.ResponseDTO
3535

36-
/// Check if a document is duplicated or not from the endpoint requestType is a collectionRef using firestore's query.
36+
/// Checks if a document is duplicated or not from the endpoint requestType is a collectionRef using firestore's query.
37+
///
38+
/// This method executes a Firestore query to check if the specified field in the document is duplicated from a collection reference.
39+
/// The query is executed using the provided endpoint and query handler.
40+
///
41+
/// - Parameters:
42+
/// - endpoint: The Firestore endpoint to query, which must conform to `FirestoreEndopintable`.
43+
/// - query: The Firestore query handler used to execute the query.
44+
/// The query should be designed to check for field duplication.
45+
/// - Returns: A publisher that emits a `Bool` indicating whether the field is duplicated (`true`) or not (`false`).
46+
/// - Throws: `FirestoreServiceError` if the query execution fails.
3747
func isFieldDuplicated(
3848
endpoint: any FirestoreEndopintable,
3949
from query: FirestoreQueryHandler

0 commit comments

Comments
 (0)